lkml.org 
[lkml]   [2014]   [Jul]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] staging: nvec: remove unneccessary 'out of memory' message
Hi,

This patch fixes the following warning reported by checkpatch.pl:

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

Regards
Pawel Lebioda

Signed-off-by: Pawel Lebioda <pawel.lebioda89@gmail.com>
drivers/staging/nvec/nvec.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/nvec/nvec.c b/drivers/staging/nvec/nvec.c
index 90f1c4d..70109f6 100644
--- a/drivers/staging/nvec/nvec.c
+++ b/drivers/staging/nvec/nvec.c
@@ -807,10 +807,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;


\
 
 \ /
  Last update: 2014-07-04 22:21    [W:0.038 / U:2.356 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site