Skip to content

Commit

Permalink
mfd: rc5t583: Delete error message for a failed memory allocation
Browse files Browse the repository at this point in the history
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 f01b90b commit 6733f64
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/mfd/rc5t583.c
Original file line number Diff line number Diff line change
Expand Up @@ -259,10 +259,8 @@ static int rc5t583_i2c_probe(struct i2c_client *i2c,
}

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

rc5t583->dev = &i2c->dev;
i2c_set_clientdata(i2c, rc5t583);
Expand Down

0 comments on commit 6733f64

Please sign in to comment.