OSDN Git Service

mfd: si476x-i2c: Delete an error message for a failed memory allocation in si476x_cor...
authorMarkus Elfring <elfring@users.sourceforge.net>
Thu, 8 Mar 2018 12:45:31 +0000 (13:45 +0100)
committerLee Jones <lee.jones@linaro.org>
Wed, 16 May 2018 08:21:48 +0000 (09:21 +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>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/mfd/si476x-i2c.c

index e6a3d99..2c5ec93 100644 (file)
@@ -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);