mfd: tps65090: Delete an error message for a failed memory allocation in tps65090_i2c...
authorMarkus Elfring <elfring@users.sourceforge.net>
Thu, 8 Mar 2018 14:25:58 +0000 (15:25 +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/tps65090.c

index d7ec318c40c30f519ed4c6a2608d061ec79d4e9d..f13e4cd06e8916e2da5c4bae75817f6b49acc2df 100644 (file)
@@ -192,10 +192,8 @@ static int tps65090_i2c_probe(struct i2c_client *client,
                irq_base = pdata->irq_base;
 
        tps65090 = devm_kzalloc(&client->dev, sizeof(*tps65090), GFP_KERNEL);
-       if (!tps65090) {
-               dev_err(&client->dev, "mem alloc for tps65090 failed\n");
+       if (!tps65090)
                return -ENOMEM;
-       }
 
        tps65090->dev = &client->dev;
        i2c_set_clientdata(client, tps65090);