Skip to content

Commit

Permalink
mfd: si476x-i2c: Delete an error message for a failed memory allocati…
Browse files Browse the repository at this point in the history
…on in si476x_core_probe()

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 6271299 commit a9241b0
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/mfd/si476x-i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit a9241b0

Please sign in to comment.