summaryrefslogtreecommitdiffstats
path: root/drivers/staging/nvec
diff options
context:
space:
mode:
authorPawel Lebioda <pawel.lebioda89@gmail.com>2014-07-05 22:30:56 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-07-09 12:14:06 -0700
commit5a9077a83321abe390b2dffde0e3fe2be0f4e6bb (patch)
treee695d9ace7fa7c6d29be790a9466a6e32d7aebfc /drivers/staging/nvec
parentaea2cda3d817a53ee13ffe0105644d1ac500cc5e (diff)
downloadlinux-5a9077a83321abe390b2dffde0e3fe2be0f4e6bb.tar.gz
linux-5a9077a83321abe390b2dffde0e3fe2be0f4e6bb.tar.bz2
linux-5a9077a83321abe390b2dffde0e3fe2be0f4e6bb.zip
staging: nvec: remove unneccessary 'out of memory' message
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>
Diffstat (limited to 'drivers/staging/nvec')
-rw-r--r--drivers/staging/nvec/nvec.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/staging/nvec/nvec.c b/drivers/staging/nvec/nvec.c
index 8a3dd4700bd2..d32504844896 100644
--- a/drivers/staging/nvec/nvec.c
+++ b/drivers/staging/nvec/nvec.c
@@ -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;