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

index 5628a6b5b19becfb28e060de827cbfaef2c6a19d..b893797827410c25450abd76fa47581c5c09d4df 100644 (file)
@@ -423,10 +423,8 @@ static struct tps6586x_platform_data *tps6586x_parse_dt(struct i2c_client *clien
        struct tps6586x_platform_data *pdata;
 
        pdata = devm_kzalloc(&client->dev, sizeof(*pdata), GFP_KERNEL);
-       if (!pdata) {
-               dev_err(&client->dev, "Memory allocation failed\n");
+       if (!pdata)
                return NULL;
-       }
 
        pdata->num_subdevs = 0;
        pdata->subdevs = NULL;