From: Pawel Lebioda Date: Sat, 5 Jul 2014 20:30:56 +0000 (+0200) Subject: staging: nvec: remove unneccessary 'out of memory' message X-Git-Tag: v3.17-rc1~123^2~1114 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=5a9077a83321abe390b2dffde0e3fe2be0f4e6bb;p=karo-tx-linux.git 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 Acked-by: Marc Dietrich Reviewed-by: Thierry Reding Signed-off-by: Greg Kroah-Hartman --- 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;