From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932263AbbLGL4K (ORCPT ); Mon, 7 Dec 2015 06:56:10 -0500 Received: from mail-wm0-f41.google.com ([74.125.82.41]:35668 "EHLO mail-wm0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756010AbbLGLup (ORCPT ); Mon, 7 Dec 2015 06:50:45 -0500 From: Lee Jones To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 03/19] mfd: ab2100-otp: Remove pointless 'out of memory' error message Date: Mon, 7 Dec 2015 11:50:16 +0000 Message-Id: <1449489032-14374-4-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1449489032-14374-1-git-send-email-lee.jones@linaro.org> References: <1449489032-14374-1-git-send-email-lee.jones@linaro.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Signed-off-by: Lee Jones --- drivers/mfd/ab3100-otp.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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 */ -- 1.9.1