* [PATCH] bq24190-charger: Delete an error message for a failed memory allocation in bq24190_probe()
@ 2017-12-17 20:42 SF Markus Elfring
0 siblings, 0 replies; only message in thread
From: SF Markus Elfring @ 2017-12-17 20:42 UTC (permalink / raw)
To: linux-pm, Sebastian Reichel; +Cc: LKML, kernel-janitors
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sun, 17 Dec 2017 21:38:55 +0100
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>
---
drivers/power/supply/bq24190_charger.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/power/supply/bq24190_charger.c b/drivers/power/supply/bq24190_charger.c
index 35ff406aca48..eda6f996b67a 100644
--- a/drivers/power/supply/bq24190_charger.c
+++ b/drivers/power/supply/bq24190_charger.c
@@ -1775,10 +1775,8 @@ static int bq24190_probe(struct i2c_client *client,
}
bdi = devm_kzalloc(dev, sizeof(*bdi), GFP_KERNEL);
- if (!bdi) {
- dev_err(dev, "Can't alloc bdi struct\n");
+ if (!bdi)
return -ENOMEM;
- }
bdi->client = client;
bdi->dev = dev;
--
2.15.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-12-17 20:43 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-17 20:42 [PATCH] bq24190-charger: Delete an error message for a failed memory allocation in bq24190_probe() SF Markus Elfring
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®