mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Julia Lawall <julia.lawall@lip6.fr>
To: Daniel Schultz <d.schultz@phytec.de>
Cc: lee.jones@linaro.org, zhangqing@rock-chips.com,
	xsf@rock-chips.com, tony.xie@rock-chips.com, w.egorov@phytec.de,
	linux-kernel@vger.kernel.org, kbuild-all@01.org
Subject: Re: [PATCH v3] mfd: rk808: Add restart functionality (fwd)
Date: Sat, 17 Mar 2018 07:16:06 +0100 (CET)	[thread overview]
Message-ID: <alpine.DEB.2.20.1803170714550.2543@hadrien> (raw)

It's not possible to do the dereferences on line 381 on a null rk808
value.

julia

---------- Forwarded message ----------
Date: Sat, 17 Mar 2018 14:05:31 +0800
From: kbuild test robot <fengguang.wu@intel.com>
To: kbuild@01.org
Cc: Julia Lawall <julia.lawall@lip6.fr>
Subject: Re: [PATCH v3] mfd: rk808: Add restart functionality

CC: kbuild-all@01.org
In-Reply-To: <1521188783-14985-1-git-send-email-d.schultz@phytec.de>
References: <1521188783-14985-1-git-send-email-d.schultz@phytec.de>
TO: Daniel Schultz <d.schultz@phytec.de>
CC: lee.jones@linaro.org, zhangqing@rock-chips.com, xsf@rock-chips.com, tony.xie@rock-chips.com, w.egorov@phytec.de, linux-kernel@vger.kernel.org
CC: zhangqing@rock-chips.com, xsf@rock-chips.com, tony.xie@rock-chips.com, w.egorov@phytec.de, linux-kernel@vger.kernel.org

Hi Daniel,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on v4.16-rc4]
[also build test WARNING on next-20180316]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Daniel-Schultz/mfd-rk808-Add-restart-functionality/20180317-110140
:::::: branch date: 3 hours ago
:::::: commit date: 3 hours ago

>> drivers/mfd/rk808.c:381:11-26: ERROR: rk808 is NULL but dereferenced.

# https://github.com/0day-ci/linux/commit/91c5d1a0547a025c6b1f1204aee5b1681e0145fe
git remote add linux-review https://github.com/0day-ci/linux
git remote update linux-review
git checkout 91c5d1a0547a025c6b1f1204aee5b1681e0145fe
vim +381 drivers/mfd/rk808.c

990f05f6 Elaine Zhang   2017-08-21  372
91c5d1a0 Daniel Schultz 2018-03-16  373  static void rk808_update_bits(unsigned int reg, unsigned int bit_mask)
990f05f6 Elaine Zhang   2017-08-21  374  {
990f05f6 Elaine Zhang   2017-08-21  375  	int ret;
990f05f6 Elaine Zhang   2017-08-21  376  	struct rk808 *rk808 = i2c_get_clientdata(rk808_i2c_client);
990f05f6 Elaine Zhang   2017-08-21  377
990f05f6 Elaine Zhang   2017-08-21  378  	if (!rk808) {
990f05f6 Elaine Zhang   2017-08-21  379  		dev_warn(&rk808_i2c_client->dev,
91c5d1a0 Daniel Schultz 2018-03-16  380  			 "have no %s, so do nothing here\n",
91c5d1a0 Daniel Schultz 2018-03-16 @381  			 rk808->regmap_irq_chip->name);
990f05f6 Elaine Zhang   2017-08-21  382  		return;
990f05f6 Elaine Zhang   2017-08-21  383  	}
990f05f6 Elaine Zhang   2017-08-21  384
990f05f6 Elaine Zhang   2017-08-21  385  	ret = regmap_update_bits(rk808->regmap,
91c5d1a0 Daniel Schultz 2018-03-16  386  				 reg,
91c5d1a0 Daniel Schultz 2018-03-16  387  				 bit_mask, bit_mask);
990f05f6 Elaine Zhang   2017-08-21  388  	if (ret)
91c5d1a0 Daniel Schultz 2018-03-16  389  		dev_err(&rk808_i2c_client->dev, "can't write to DEVCTRL: %x!\n",
91c5d1a0 Daniel Schultz 2018-03-16  390  			ret);
990f05f6 Elaine Zhang   2017-08-21  391  }
990f05f6 Elaine Zhang   2017-08-21  392

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

                 reply	other threads:[~2018-03-17  6:16 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=alpine.DEB.2.20.1803170714550.2543@hadrien \
    --to=julia.lawall@lip6.fr \
    --cc=d.schultz@phytec.de \
    --cc=kbuild-all@01.org \
    --cc=lee.jones@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tony.xie@rock-chips.com \
    --cc=w.egorov@phytec.de \
    --cc=xsf@rock-chips.com \
    --cc=zhangqing@rock-chips.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

all inboxes | Powered by JetHome®