summaryrefslogtreecommitdiffstats
path: root/drivers/mfd/ab3100-otp.c
diff options
context:
space:
mode:
authorLee Jones <lee.jones@linaro.org>2015-10-28 09:08:22 +0000
committerLee Jones <lee.jones@linaro.org>2016-01-14 08:43:53 +0000
commit845b76f891999f98b7acb439768c9d50959d29e1 (patch)
tree02feeb383faa7e8f10d2c7e06443674c6acb13c3 /drivers/mfd/ab3100-otp.c
parent15544cab2880c6990704ff91c0f11c5ccc3aafad (diff)
downloadop-kernel-dev-845b76f891999f98b7acb439768c9d50959d29e1.zip
op-kernel-dev-845b76f891999f98b7acb439768c9d50959d29e1.tar.gz
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 <linus.walleij@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'drivers/mfd/ab3100-otp.c')
-rw-r--r--drivers/mfd/ab3100-otp.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/mfd/ab3100-otp.c b/drivers/mfd/ab3100-otp.c
index f391c5fe..55b207a 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 */
OpenPOWER on IntegriCloud