Skip to content

Commit 5a9077a

Browse files
plebiodagregkh
authored andcommitted
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>
1 parent aea2cda commit 5a9077a

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

‎drivers/staging/nvec/nvec.c‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -806,10 +806,9 @@ static int tegra_nvec_probe(struct platform_device *pdev)
806806
}
807807

808808
nvec = devm_kzalloc(&pdev->dev, sizeof(struct nvec_chip), GFP_KERNEL);
809-
if (nvec == NULL) {
810-
dev_err(&pdev->dev, "failed to reserve memory\n");
809+
if (nvec == NULL)
811810
return -ENOMEM;
812-
}
811+
813812
platform_set_drvdata(pdev, nvec);
814813
nvec->dev = &pdev->dev;
815814

0 commit comments

Comments
 (0)