OSDN Git Service

pata_arasan_cf: Delete an error message for a failed memory allocation in arasan_cf_p...
authorMarkus Elfring <elfring@users.sourceforge.net>
Fri, 16 Feb 2018 15:01:12 +0000 (16:01 +0100)
committerTejun Heo <tj@kernel.org>
Sun, 18 Feb 2018 13:16:06 +0000 (05:16 -0800)
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>
drivers/ata/pata_arasan_cf.c

index b4d5477..be5fbce 100644 (file)
@@ -809,10 +809,8 @@ static int arasan_cf_probe(struct platform_device *pdev)
        }
 
        acdev = devm_kzalloc(&pdev->dev, sizeof(*acdev), GFP_KERNEL);
-       if (!acdev) {
-               dev_warn(&pdev->dev, "kzalloc fail\n");
+       if (!acdev)
                return -ENOMEM;
-       }
 
        if (pdata)
                quirk = pdata->quirk;