]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
[media] media: img-ir: delete an error message for a failed memory allocation
authorMarkus Elfring <elfring@users.sourceforge.net>
Tue, 29 Aug 2017 19:04:20 +0000 (16:04 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Wed, 4 Oct 2017 18:19:06 +0000 (15:19 -0300)
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: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/rc/img-ir/img-ir-core.c

index 03fe080278df3eab251c4eab71d3aa2e23368264..bcbabeeab12af94a6f5cbfec809c01bc67dc2060 100644 (file)
@@ -92,10 +92,9 @@ static int img_ir_probe(struct platform_device *pdev)
 
        /* Private driver data */
        priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL);
-       if (!priv) {
-               dev_err(&pdev->dev, "cannot allocate device data\n");
+       if (!priv)
                return -ENOMEM;
-       }
+
        platform_set_drvdata(pdev, priv);
        priv->dev = &pdev->dev;
        spin_lock_init(&priv->lock);