From: Markus Elfring Date: Fri, 16 Feb 2018 09:55:51 +0000 (+0100) Subject: pata_samsung_cf: Delete an error message for a failed memory allocation in pata_s3c_p... X-Git-Tag: v4.17-rc1~142^2~20 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b02b54914b2f2eb2c310497cfabb054e95fa1e2e;p=thirdparty%2Fkernel%2Flinux.git 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 Signed-off-by: Tejun Heo --- diff --git a/drivers/ata/pata_samsung_cf.c b/drivers/ata/pata_samsung_cf.c index 50801c40b0295..bb96dc35950d0 100644 --- a/drivers/ata/pata_samsung_cf.c +++ b/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);