diff options
-rw-r--r-- | drivers/mfd/abx500-core.c | 2 | ||||
-rw-r--r-- | include/linux/mfd/abx500.h | 4 |
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 */ |