* [PATCH] mfd/si476x-i2c: Delete an error message for a failed memory allocation in si476x_core_probe()
@ 2018-01-15 14:26 SF Markus Elfring
0 siblings, 0 replies; only message in thread
From: SF Markus Elfring @ 2018-01-15 14:26 UTC (permalink / raw)
To: kernel-janitors, Lee Jones; +Cc: LKML
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Mon, 15 Jan 2018 15:10:33 +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/si476x-i2c.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/mfd/si476x-i2c.c b/drivers/mfd/si476x-i2c.c
index e6a3d999a376..2c5ec93333c3 100644
--- a/drivers/mfd/si476x-i2c.c
+++ b/drivers/mfd/si476x-i2c.c
@@ -697,11 +697,9 @@ static int si476x_core_probe(struct i2c_client *client,
int cell_num;
core = devm_kzalloc(&client->dev, sizeof(*core), GFP_KERNEL);
- if (!core) {
- dev_err(&client->dev,
- "failed to allocate 'struct si476x_core'\n");
+ if (!core)
return -ENOMEM;
- }
+
core->client = client;
core->regmap = devm_regmap_init_si476x(core);
--
2.15.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2018-01-15 14:27 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-15 14:26 [PATCH] mfd/si476x-i2c: Delete an error message for a failed memory allocation in si476x_core_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®