Skip to contentSkip to conversation

mfd/tps65090: Delete an error message for a failed memory allocation in tps65090_i2c_probe()

PATCH New SF Markus Elfring 1 participant 1 message Jan 16, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mfd/tps65090: Delete an error message for a failed memory allocation in tps65090_i2c_probe()

From: Markus Elfring <[email protected]>
Date: Tue, 16 Jan 2018 10:37:33 +0100

Omit an extra message for a memory allocation failure in this function.

This issue was detected by using the Coccinelle software.

---
 drivers/mfd/tps65090.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/mfd/tps65090.c +1 -3
index d7ec318c40c3..f13e4cd06e89 100644
@@ -192,10 +192,8 @@ static int tps65090_i2c_probe(struct i2c_client *client,
 		irq_base = pdata->irq_base;
 
 	tps65090 = devm_kzalloc(&client->dev, sizeof(*tps65090), GFP_KERNEL);
-	if (!tps65090) {
-		dev_err(&client->dev, "mem alloc for tps65090 failed\n");
+	if (!tps65090)
 		return -ENOMEM;
-	}
 
 	tps65090->dev = &client->dev;
 	i2c_set_clientdata(client, tps65090);
Signature · 1 line
2.15.1