staging: nvec: remove unneccessary 'out of memory' message
authorPawel Lebioda <pawel.lebioda89@gmail.com>
Sat, 5 Jul 2014 20:30:56 +0000 (22:30 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 9 Jul 2014 19:14:06 +0000 (12:14 -0700)
Fix the following warning reported by checkpatch.pl:

WARNING: Possible unnecessary 'out of memory' message
811: FILE: drivers/staging/nvec/nvec.c:811

Signed-off-by: Pawel Lebioda <pawel.lebioda89@gmail.com>
Acked-by: Marc Dietrich <marvin24@gmx.de>
Reviewed-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/nvec/nvec.c

index 8a3dd4700bd29ca92da2ea64b7c173e91d801c13..d325048448963a5630291ef29873c6e809253037 100644 (file)
@@ -806,10 +806,9 @@ static int tegra_nvec_probe(struct platform_device *pdev)
        }
 
        nvec = devm_kzalloc(&pdev->dev, sizeof(struct nvec_chip), GFP_KERNEL);
-       if (nvec == NULL) {
-               dev_err(&pdev->dev, "failed to reserve memory\n");
+       if (nvec == NULL)
                return -ENOMEM;
-       }
+
        platform_set_drvdata(pdev, nvec);
        nvec->dev = &pdev->dev;