Skip to contentSkip to conversation

i2c-ibm_iic: Delete an error message for a failed memory allocation in iic_probe()

PATCH New SF Markus Elfring 1 participant 1 message Feb 2, 2018

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

PATCH 1/1 i2c-ibm_iic: Delete an error message for a failed memory allocation in iic_probe()

From: Markus Elfring <[email protected]>
Date: Fri, 2 Feb 2018 17:24:57 +0100

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

This issue was detected by using the Coccinelle software.

---
 drivers/i2c/busses/i2c-ibm_iic.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/i2c/busses/i2c-ibm_iic.c +1 -3
index 961c5f42d956..1bd4d6dde0fe 100644
@@ -702,10 +702,8 @@ static int iic_probe(struct platform_device *ofdev)
 	int ret;
 
 	dev = kzalloc(sizeof(*dev), GFP_KERNEL);
-	if (!dev) {
-		dev_err(&ofdev->dev, "failed to allocate device data\n");
+	if (!dev)
 		return -ENOMEM;
-	}
 
 	platform_set_drvdata(ofdev, dev);
 
Signature · 1 line
2.16.1