diff mbox

[03/19] mfd: ab2100-otp: Remove pointless 'out of memory' error message

Message ID 1449489032-14374-4-git-send-email-lee.jones@linaro.org
State Accepted
Commit 845b76f891999f98b7acb439768c9d50959d29e1
Headers show

Commit Message

Lee Jones Dec. 7, 2015, 11:50 a.m. UTC
WARNING: Possible unnecessary 'out of memory' message
+       if (!otp) {
+               dev_err(&pdev->dev, "could not allocate AB3100 OTP device\n");

total: 0 errors, 1 warnings, 250 lines checked

Cc: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>

---
 drivers/mfd/ab3100-otp.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

-- 
1.9.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
diff mbox

Patch

diff --git a/drivers/mfd/ab3100-otp.c b/drivers/mfd/ab3100-otp.c
index f391c5fe..55b207a4 100644
--- a/drivers/mfd/ab3100-otp.c
+++ b/drivers/mfd/ab3100-otp.c
@@ -188,10 +188,9 @@  static int __init ab3100_otp_probe(struct platform_device *pdev)
 	int i;
 
 	otp = devm_kzalloc(&pdev->dev, sizeof(struct ab3100_otp), GFP_KERNEL);
-	if (!otp) {
-		dev_err(&pdev->dev, "could not allocate AB3100 OTP device\n");
+	if (!otp)
 		return -ENOMEM;
-	}
+
 	otp->dev = &pdev->dev;
 
 	/* Replace platform data coming in with a local struct */