mfd: sm501: Delete error message for a failed memory allocation in two places
authorMarkus Elfring <elfring@users.sourceforge.net>
Mon, 15 Jan 2018 14:40:46 +0000 (15:40 +0100)
committerLee Jones <lee.jones@linaro.org>
Wed, 16 May 2018 08:21:48 +0000 (09:21 +0100)
Omit an extra message for a memory allocation failure in these functions.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/mfd/sm501.c

index ad77416..7298d6b 100644 (file)
@@ -1385,7 +1385,6 @@ static int sm501_plat_probe(struct platform_device *dev)
 
        sm = kzalloc(sizeof(struct sm501_devdata), GFP_KERNEL);
        if (sm == NULL) {
-               dev_err(&dev->dev, "no memory for device data\n");
                ret = -ENOMEM;
                goto err1;
        }
@@ -1575,7 +1574,6 @@ static int sm501_pci_probe(struct pci_dev *dev,
 
        sm = kzalloc(sizeof(struct sm501_devdata), GFP_KERNEL);
        if (sm == NULL) {
-               dev_err(&dev->dev, "no memory for device data\n");
                err = -ENOMEM;
                goto err1;
        }