* [PATCH] mfd/tps80031: Delete an error message for a failed memory allocation in tps80031_probe()
@ 2018-01-16 12:55 SF Markus Elfring
0 siblings, 0 replies; only message in thread
From: SF Markus Elfring @ 2018-01-16 12:55 UTC (permalink / raw)
To: kernel-janitors, Lee Jones
Cc: LKML, Laxman Dewangan, Mark Brown, Samuel Ortiz
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Tue, 16 Jan 2018 13:43:03 +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/mfd/tps80031.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/mfd/tps80031.c b/drivers/mfd/tps80031.c
index 0812df3b0d47..608c7f77830e 100644
--- a/drivers/mfd/tps80031.c
+++ b/drivers/mfd/tps80031.c
@@ -431,10 +431,8 @@ static int tps80031_probe(struct i2c_client *client,
}
tps80031 = devm_kzalloc(&client->dev, sizeof(*tps80031), GFP_KERNEL);
- if (!tps80031) {
- dev_err(&client->dev, "Malloc failed for tps80031\n");
+ if (!tps80031)
return -ENOMEM;
- }
for (i = 0; i < TPS80031_NUM_SLAVES; i++) {
if (tps80031_slave_address[i] == client->addr)
--
2.15.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2018-01-16 12:56 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-16 12:55 [PATCH] mfd/tps80031: Delete an error message for a failed memory allocation in tps80031_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®