Browse Source

pata_samsung_cf: Delete an error message for a failed memory allocation in pata_s3c_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: Tejun Heo <tj@kernel.org>
Markus Elfring 7 years ago
parent
commit
b02b54914b
1 changed files with 1 additions and 3 deletions
  1. 1 3
      drivers/ata/pata_samsung_cf.c

+ 1 - 3
drivers/ata/pata_samsung_cf.c

@@ -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);