]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
pata_samsung_cf: Delete an error message for a failed memory allocation in pata_s3c_p...
authorMarkus Elfring <elfring@users.sourceforge.net>
Fri, 16 Feb 2018 09:55:51 +0000 (10:55 +0100)
committerTejun Heo <tj@kernel.org>
Sun, 18 Feb 2018 13:20:38 +0000 (05:20 -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_samsung_cf.c

index 50801c40b0295229ecc82d7ce52b849f9ac513f1..bb96dc35950d0bae9d0d7b7fbc12a5f9eeddab91 100644 (file)
@@ -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);