From: Lee Jones Date: Wed, 28 Oct 2015 09:08:22 +0000 (+0000) Subject: mfd: ab2100-otp: Remove pointless 'out of memory' error message X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=845b76f891999f98b7acb439768c9d50959d29e1;p=openwrt%2Fstaging%2Fblogic.git mfd: ab2100-otp: Remove pointless 'out of memory' error message 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 --- diff --git a/drivers/mfd/ab3100-otp.c b/drivers/mfd/ab3100-otp.c index f391c5fee1b0..55b207a4b336 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 */