Skip to contentSkip to conversation

sh_mobile_ceu_camera: Delete an error message for a failed memory allocation in sh_mobile_ceu_probe()

PATCH New SF Markus Elfring 1 participant 1 message Sep 15, 2017

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

PATCH 1/1 sh_mobile_ceu_camera: Delete an error message for a failed memory allocation in sh_mobile_ceu_probe()

From: Markus Elfring <[email protected]>
Date: Fri, 15 Sep 2017 16:15:47 +0200

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

This issue was detected by using the Coccinelle software.

---
 drivers/media/platform/soc_camera/sh_mobile_ceu_camera.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/media/platform/soc_camera/sh_mobile_ceu_camera.c +1 -3
index 36762ec954e7..28b1d6d1275a 100644
@@ -1653,10 +1653,8 @@ static int sh_mobile_ceu_probe(struct platform_device *pdev)
 	}
 
 	pcdev = devm_kzalloc(&pdev->dev, sizeof(*pcdev), GFP_KERNEL);
-	if (!pcdev) {
-		dev_err(&pdev->dev, "Could not allocate pcdev\n");
+	if (!pcdev)
 		return -ENOMEM;
-	}
 
 	INIT_LIST_HEAD(&pcdev->capture);
 	spin_lock_init(&pcdev->lock);
Signature · 1 line
2.14.1