From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: kbuild@lists.01.org, Linus Walleij <linus.walleij@linaro.org>,
kbuild test robot <lkp@intel.com>,
kbuild-all@lists.01.org,
Linux Memory Management List <linux-mm@kvack.org>,
Jonathan Cameron <Jonathan.Cameron@huawei.com>
Subject: Re: [linux-next:master 2008/11103] drivers/iio/magnetometer/yamaha-yas530.c:891 yas5xx_probe() warn: missing error code 'ret'
Date: Mon, 15 Feb 2021 17:05:26 +0200 [thread overview]
Message-ID: <CAHp75VdeMOFTsHBG5FLiLGhOc_Y9708oaA3zeqreii-fMe3umA@mail.gmail.com> (raw)
In-Reply-To: <20210215134015.GR2087@kadam>
On Mon, Feb 15, 2021 at 3:40 PM Dan Carpenter <dan.carpenter@oracle.com> wrote:
>
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> head: 07f7e57c63aaa2afb4ea31edef05e08699a63a00
> commit: de8860b1ed4701ea7e6f760f02d79ca6a3b656a1 [2008/11103] iio: magnetometer: Add driver for Yamaha YAS530
> config: x86_64-randconfig-m001-20210215 (attached as .config)
> compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> smatch warnings:
> drivers/iio/magnetometer/yamaha-yas530.c:891 yas5xx_probe() warn: missing error code 'ret'
Indeed.
> de8860b1ed4701 Linus Walleij 2020-12-24 872 switch (yas5xx->devid) {
> de8860b1ed4701 Linus Walleij 2020-12-24 873 case YAS530_DEVICE_ID:
> de8860b1ed4701 Linus Walleij 2020-12-24 874 ret = yas530_get_calibration_data(yas5xx);
> de8860b1ed4701 Linus Walleij 2020-12-24 875 if (ret)
> de8860b1ed4701 Linus Walleij 2020-12-24 876 goto assert_reset;
> de8860b1ed4701 Linus Walleij 2020-12-24 877 dev_info(dev, "detected YAS530 MS-3E %s",
> de8860b1ed4701 Linus Walleij 2020-12-24 878 yas5xx->version ? "B" : "A");
> de8860b1ed4701 Linus Walleij 2020-12-24 879 strncpy(yas5xx->name, "yas530", sizeof(yas5xx->name));
> de8860b1ed4701 Linus Walleij 2020-12-24 880 break;
> de8860b1ed4701 Linus Walleij 2020-12-24 881 case YAS532_DEVICE_ID:
> de8860b1ed4701 Linus Walleij 2020-12-24 882 ret = yas532_get_calibration_data(yas5xx);
> de8860b1ed4701 Linus Walleij 2020-12-24 883 if (ret)
> de8860b1ed4701 Linus Walleij 2020-12-24 884 goto assert_reset;
> de8860b1ed4701 Linus Walleij 2020-12-24 885 dev_info(dev, "detected YAS532/YAS533 MS-3R/F %s",
> de8860b1ed4701 Linus Walleij 2020-12-24 886 yas5xx->version ? "AC" : "AB");
> de8860b1ed4701 Linus Walleij 2020-12-24 887 strncpy(yas5xx->name, "yas532", sizeof(yas5xx->name));
> de8860b1ed4701 Linus Walleij 2020-12-24 888 break;
> de8860b1ed4701 Linus Walleij 2020-12-24 889 default:
> de8860b1ed4701 Linus Walleij 2020-12-24 890 dev_err(dev, "unhandled device ID %02x\n", yas5xx->devid);
> de8860b1ed4701 Linus Walleij 2020-12-24 @891 goto assert_reset;
>
> "ret = -EINVAL;"
I think more of -ENODEV.
> de8860b1ed4701 Linus Walleij 2020-12-24 892 }
--
With Best Regards,
Andy Shevchenko
prev parent reply other threads:[~2021-02-15 15:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-15 13:40 Dan Carpenter
2021-02-15 15:05 ` Andy Shevchenko [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAHp75VdeMOFTsHBG5FLiLGhOc_Y9708oaA3zeqreii-fMe3umA@mail.gmail.com \
--to=andy.shevchenko@gmail.com \
--cc=Jonathan.Cameron@huawei.com \
--cc=dan.carpenter@oracle.com \
--cc=kbuild-all@lists.01.org \
--cc=kbuild@lists.01.org \
--cc=linus.walleij@linaro.org \
--cc=linux-mm@kvack.org \
--cc=lkp@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox