mfd: tps65910: Delete an error message for a failed memory allocation in tps65910_par...
authorMarkus Elfring <elfring@users.sourceforge.net>
Fri, 9 Mar 2018 08:00:59 +0000 (09:00 +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/tps65910.c

index 8263605f6d2fa2b76eb36b4f1589eb5dba6b8b0b..555bd394efc31142f543b4ad7b1bfa49cb5b9d32 100644 (file)
@@ -395,10 +395,8 @@ static struct tps65910_board *tps65910_parse_dt(struct i2c_client *client,
 
        board_info = devm_kzalloc(&client->dev, sizeof(*board_info),
                        GFP_KERNEL);
-       if (!board_info) {
-               dev_err(&client->dev, "Failed to allocate pdata\n");
+       if (!board_info)
                return NULL;
-       }
 
        ret = of_property_read_u32(np, "ti,vmbch-threshold", &prop);
        if (!ret)