Skip to contentSkip to conversation

pata_samsung_cf: Delete an error message for a failed memory allocation in pata_s3c_probe()

PATCH Applied SF Markus Elfring 2 participants 2 messages Feb 16, 2018 – Feb 18, 2018

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

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

From: Markus Elfring <[email protected]>
Date: Fri, 16 Feb 2018 10:55:51 +0100

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

This issue was detected by using the Coccinelle software.

---
 drivers/ata/pata_samsung_cf.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/ata/pata_samsung_cf.c +1 -3
index 50801c40b029..bb96dc35950d 100644
@@ -505,10 +505,8 @@ static int __init pata_s3c_probe(struct platform_device *pdev)
 	cpu_type = platform_get_device_id(pdev)->driver_data;
 
 	info = devm_kzalloc(dev, sizeof(*info), GFP_KERNEL);
-	if (!info) {
-		dev_err(dev, "failed to allocate memory for device data\n");
+	if (!info)
 		return -ENOMEM;
-	}
 
 	info->irq = platform_get_irq(pdev, 0);
 
Signature · 1 line
2.16.1
Applied
#1 lore raw
Quoted 8 lines · SF Markus Elfring

From: Markus Elfring <[email protected]>
Date: Fri, 16 Feb 2018 10:55:51 +0100

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

This issue was detected by using the Coccinelle software.

Applied to libata/for-4.17.

Thanks.

Signature · 1 line
tejun