Skip to content

Commit

Permalink
mfd: smsc-ece1099: Delete an error message for a failed memory alloca…
Browse files Browse the repository at this point in the history
…tion

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 24303ee commit 46c8aa8
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/mfd/smsc-ece1099.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,8 @@ static int smsc_i2c_probe(struct i2c_client *i2c,

smsc = devm_kzalloc(&i2c->dev, sizeof(struct smsc),
GFP_KERNEL);
if (!smsc) {
dev_err(&i2c->dev, "smsc mfd driver memory allocation failed\n");
if (!smsc)
return -ENOMEM;
}

smsc->regmap = devm_regmap_init_i2c(i2c, &smsc_regmap_config);
if (IS_ERR(smsc->regmap))
Expand Down

0 comments on commit 46c8aa8

Please sign in to comment.