summaryrefslogtreecommitdiffstats
path: root/drivers/mfd/tps80031.c
diff options
context:
space:
mode:
authorMarkus Elfring2018-03-09 09:45:13 +0100
committerLee Jones2018-05-16 10:21:48 +0200
commit7672c840a3145da641ed1da5ce064f9f5fb986b0 (patch)
treee32b17adaa821fcb9d0447c711ca8cde6fa9b22d /drivers/mfd/tps80031.c
parentmfd: tps65910: Move an assignment in tps65910_sleepinit() (diff)
downloadkernel-qcow2-linux-7672c840a3145da641ed1da5ce064f9f5fb986b0.tar.gz
kernel-qcow2-linux-7672c840a3145da641ed1da5ce064f9f5fb986b0.tar.xz
kernel-qcow2-linux-7672c840a3145da641ed1da5ce064f9f5fb986b0.zip
mfd: tps80031: Delete an error message for a failed memory allocation in tps80031_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 <elfring@users.sourceforge.net> Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'drivers/mfd/tps80031.c')
-rw-r--r--drivers/mfd/tps80031.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/mfd/tps80031.c b/drivers/mfd/tps80031.c
index 0812df3b0d47..608c7f77830e 100644
--- a/drivers/mfd/tps80031.c
+++ b/drivers/mfd/tps80031.c
@@ -431,10 +431,8 @@ static int tps80031_probe(struct i2c_client *client,
}
tps80031 = devm_kzalloc(&client->dev, sizeof(*tps80031), GFP_KERNEL);
- if (!tps80031) {
- dev_err(&client->dev, "Malloc failed for tps80031\n");
+ if (!tps80031)
return -ENOMEM;
- }
for (i = 0; i < TPS80031_NUM_SLAVES; i++) {
if (tps80031_slave_address[i] == client->addr)