diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2018-01-16 10:52:27 +0300 |
---|---|---|
committer | Lee Jones <lee.jones@linaro.org> | 2018-05-16 11:21:48 +0300 |
commit | 46c8aa8e3fe61c7bb5dbbc9db379eeb01dc97472 (patch) | |
tree | 8f9f36ea95aa81c177be05a3f61de4698706dc73 | |
parent | 24303ee7210efb49467693c32d56fbf5d64a840d (diff) | |
download | linux-46c8aa8e3fe61c7bb5dbbc9db379eeb01dc97472.tar.xz |
mfd: smsc-ece1099: Delete an 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>
-rw-r--r-- | drivers/mfd/smsc-ece1099.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/mfd/smsc-ece1099.c b/drivers/mfd/smsc-ece1099.c index 93a8297de52a..b9d96651cc0d 100644 --- a/drivers/mfd/smsc-ece1099.c +++ b/drivers/mfd/smsc-ece1099.c @@ -39,10 +39,8 @@ static int smsc_i2c_probe(struct i2c_client *i2c, smsc = devm_kzalloc(&i2c->dev, sizeof(struct smsc), GFP_KERNEL); - if (!smsc) { - dev_err(&i2c->dev, "smsc mfd driver memory allocation failed\n"); + if (!smsc) return -ENOMEM; - } smsc->regmap = devm_regmap_init_i2c(i2c, &smsc_regmap_config); if (IS_ERR(smsc->regmap)) |