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>
        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 */