aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMattias Wallin <mattias.wallin@stericsson.com>2010-06-23 10:45:47 +0200
committerJohn Rigby <john.rigby@linaro.org>2010-09-02 22:45:47 -0600
commit0282d8a180e1c89e8bf1b9fdce90ebecee1e19a5 (patch)
treeffc55f375c411c79d150062b7d9a6d718fe48fb7
parentf91262279263c4ae77ef798030e7ccee3a854aa6 (diff)
downloadlinux-2.6.34-ux500-0282d8a180e1c89e8bf1b9fdce90ebecee1e19a5.tar.gz
abx500 kmalloc and doc bugfix
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/1835 Tested-by: Mattias WALLIN <mattias.wallin@stericsson.com> Reviewed-by: Linus WALLEIJ <linus.walleij@stericsson.com> Signed-off-by: Mian Yousaf Kaukab <mian.yousaf.kaukab@stericsson.com> Change-Id: I9de57eec90220bfbfc6f278dc7899ebc01a08d1f Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/2636 Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
-rw-r--r--drivers/mfd/abx500-core.c2
-rw-r--r--include/linux/mfd/abx500.h4
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/mfd/abx500-core.c b/drivers/mfd/abx500-core.c
index 22d02fe4e45..8f7b71d0ca8 100644
--- a/drivers/mfd/abx500-core.c
+++ b/drivers/mfd/abx500-core.c
@@ -36,7 +36,7 @@ int abx500_register_ops(struct device *dev, struct abx500_ops *ops)
struct abx500_device_entry *dev_entry;
dev_entry = kmalloc(sizeof(struct abx500_device_entry), GFP_KERNEL);
- if (dev_entry) {
+ if (!dev_entry) {
dev_err(dev, "register_ops kzalloc failed");
return -ENOMEM;
}
diff --git a/include/linux/mfd/abx500.h b/include/linux/mfd/abx500.h
index 7ef38070947..7ee76b5562b 100644
--- a/include/linux/mfd/abx500.h
+++ b/include/linux/mfd/abx500.h
@@ -218,7 +218,7 @@ struct abx500_init_settings {
* @dev_data: Device specific data
* @dev_data_sz: Size of dev_data in bytes
* @init_settings: Initial I2C register settings
- * @init_settings_sz: Size of init_settings in bytes
+ * @init_settings_sz: Size of init_settings array (ARRAY_SIZE)
*
* Data supplied to initialize board connections to the AB3550
*/
@@ -273,7 +273,7 @@ enum ab5500_banks {
* @dev_data: Device specific data
* @dev_data_sz: Size of dev_data in bytes
* @init_settings: Initial I2C register settings
- * @init_settings_sz: Size of init_settings in bytes
+ * @init_settings_sz: Size of init_settings array (ARRAY_SIZE)
*
* Data supplied to initialize board connections to the AB5500
*/