mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@linaro.org>
To: oe-kbuild@lists.linux.dev, Biju Das <biju.das.jz@bp.renesas.com>,
	Linus Walleij <linus.walleij@linaro.org>
Cc: lkp@intel.com, oe-kbuild-all@lists.linux.dev,
	Biju Das <biju.das.jz@bp.renesas.com>,
	linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Subject: Re: [PATCH 2/2] pinctrl: mcp23s08: Simplify probe()
Date: Tue, 5 Sep 2023 14:31:35 +0300	[thread overview]
Message-ID: <2ce09856-244a-4e3f-89ff-d9439ea06af9@kadam.mountain> (raw)
In-Reply-To: <20230902090937.32195-3-biju.das.jz@bp.renesas.com>

Hi Biju,

kernel test robot noticed the following build warnings:

https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Biju-Das/pinctrl-mcp23s08-Extend-match-support-for-OF-tables/20230902-171023
base:   https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl.git devel
patch link:    https://lore.kernel.org/r/20230902090937.32195-3-biju.das.jz%40bp.renesas.com
patch subject: [PATCH 2/2] pinctrl: mcp23s08: Simplify probe()
config: i386-randconfig-141-20230902 (https://download.01.org/0day-ci/archive/20230903/202309030751.GQvtrZnS-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce: (https://download.01.org/0day-ci/archive/20230903/202309030751.GQvtrZnS-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
| Closes: https://lore.kernel.org/r/202309030751.GQvtrZnS-lkp@intel.com/

smatch warnings:
drivers/pinctrl/pinctrl-mcp23s08_i2c.c:33 mcp230xx_probe() error: we previously assumed 'info' could be null (see line 31)

vim +/info +33 drivers/pinctrl/pinctrl-mcp23s08_i2c.c

8bb5811129f9e4 Uwe Kleine-König 2022-11-18  19  static int mcp230xx_probe(struct i2c_client *client)
0f04a81784fe3d Andy Shevchenko  2020-04-07  20  {
b5f259f6fc5912 Biju Das         2023-09-02  21  	const struct mcp23s08_i2c_info *info;
0f04a81784fe3d Andy Shevchenko  2020-04-07  22  	struct device *dev = &client->dev;
0f04a81784fe3d Andy Shevchenko  2020-04-07  23  	struct mcp23s08 *mcp;
0f04a81784fe3d Andy Shevchenko  2020-04-07  24  	int ret;
0f04a81784fe3d Andy Shevchenko  2020-04-07  25  
0f04a81784fe3d Andy Shevchenko  2020-04-07  26  	mcp = devm_kzalloc(dev, sizeof(*mcp), GFP_KERNEL);
0f04a81784fe3d Andy Shevchenko  2020-04-07  27  	if (!mcp)
0f04a81784fe3d Andy Shevchenko  2020-04-07  28  		return -ENOMEM;
0f04a81784fe3d Andy Shevchenko  2020-04-07  29  
b5f259f6fc5912 Biju Das         2023-09-02  30  	info = i2c_get_match_data(client);
b5f259f6fc5912 Biju Das         2023-09-02 @31  	if (!info)
b5f259f6fc5912 Biju Das         2023-09-02  32  		return dev_err_probe(dev, -EINVAL, "invalid device type (%d)\n",
b5f259f6fc5912 Biju Das         2023-09-02 @33  				     info->type);
                                                                                     ^^^^^^^^^^
info is NULL.

0f04a81784fe3d Andy Shevchenko  2020-04-07  34  
b5f259f6fc5912 Biju Das         2023-09-02  35  	mcp->reg_shift = info->reg_shift;

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki


  parent reply	other threads:[~2023-09-05 16:51 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-02  9:09 [PATCH 0/2] Match data improvements for mcp23s08 driver Biju Das
2023-09-02  9:09 ` [PATCH 1/2] pinctrl: mcp23s08: Extend match support for OF tables Biju Das
2023-09-04  9:09   ` Andy Shevchenko
2023-09-02  9:09 ` [PATCH 2/2] pinctrl: mcp23s08: Simplify probe() Biju Das
2023-09-04  9:12   ` Andy Shevchenko
2023-09-05 11:31   ` Dan Carpenter [this message]
2023-09-04  9:14 ` [PATCH 0/2] Match data improvements for mcp23s08 driver Andy Shevchenko

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=2ce09856-244a-4e3f-89ff-d9439ea06af9@kadam.mountain \
    --to=dan.carpenter@linaro.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=biju.das.jz@bp.renesas.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=oe-kbuild@lists.linux.dev \
    /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

all inboxes | Powered by JetHome®