Skip to content

Commit

Permalink
mfd: tps65910: Delete an error message for a failed memory allocation…
Browse files Browse the repository at this point in the history
… in tps65910_parse_dt()

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 <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
  • Loading branch information
elfring authored and Lee Jones committed May 16, 2018
1 parent feafdff commit 93e879e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/mfd/tps65910.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 93e879e

Please sign in to comment.