From: Markus Elfring Date: Thu, 8 Mar 2018 12:45:31 +0000 (+0100) Subject: mfd: si476x-i2c: Delete an error message for a failed memory allocation in si476x_cor... X-Git-Tag: v4.18-rc1~61^2~49 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=a9241b0921171bc8e595fa200aa021565cefcdcd;p=uclinux-h8%2Flinux.git mfd: si476x-i2c: Delete an error message for a failed memory allocation in si476x_core_probe() 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 Signed-off-by: Lee Jones --- 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);