diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2018-01-14 22:02:16 +0100 |
---|---|---|
committer | Lee Jones <lee.jones@linaro.org> | 2018-05-16 10:21:48 +0200 |
commit | 2e4d5494ab93a4f5320821e50510682630e556d5 (patch) | |
tree | 2388fde8e586b879d041cf327d7d6d659114401d /drivers/mfd/htc-i2cpld.c | |
parent | mfd: syscon: Remove unused Exynos PMU headers (diff) | |
download | linux-2e4d5494ab93a4f5320821e50510682630e556d5.tar.xz linux-2e4d5494ab93a4f5320821e50510682630e556d5.zip |
mfd: htc-i2cpld: Delete error message for a failed memory allocation
Omit an extra message for a memory allocation failure in this function.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to '')
-rw-r--r-- | drivers/mfd/htc-i2cpld.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/mfd/htc-i2cpld.c b/drivers/mfd/htc-i2cpld.c index 3f9eee5f8fb9..4bf8b7781c77 100644 --- a/drivers/mfd/htc-i2cpld.c +++ b/drivers/mfd/htc-i2cpld.c @@ -479,10 +479,8 @@ static int htcpld_setup_chips(struct platform_device *pdev) htcpld->nchips = pdata->num_chip; htcpld->chip = devm_kzalloc(dev, sizeof(struct htcpld_chip) * htcpld->nchips, GFP_KERNEL); - if (!htcpld->chip) { - dev_warn(dev, "Unable to allocate memory for chips\n"); + if (!htcpld->chip) return -ENOMEM; - } /* Add the chips as best we can */ for (i = 0; i < htcpld->nchips; i++) { |