Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <error27@gmail.com>
To: oe-kbuild@lists.linux.dev, ChiaEn Wu <chiaen_wu@richtek.com>,
	jic23@kernel.org, lars@metafoo.de, matthias.bgg@gmail.com,
	angelogioacchino.delregno@collabora.com
Cc: lkp@intel.com, oe-kbuild-all@lists.linux.dev,
	linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org, peterwu.pub@gmail.com,
	cy_huang@richtek.com, ChiaEn Wu <chiaen_wu@richtek.com>
Subject: Re: [PATCH] iio: adc: mt6370: Fix ibus and ibat scaling value of some specific vendor ID chips
Date: Thu, 30 Mar 2023 18:27:50 +0300	[thread overview]
Message-ID: <75f27c56-5e35-40dc-a320-66bf6a8ed36f@kili.mountain> (raw)
In-Reply-To: <1679667167-16261-1-git-send-email-chiaen_wu@richtek.com>

Hi ChiaEn,

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

url:    https://github.com/intel-lab-lkp/linux/commits/ChiaEn-Wu/iio-adc-mt6370-Fix-ibus-and-ibat-scaling-value-of-some-specific-vendor-ID-chips/20230324-221545
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg
patch link:    https://lore.kernel.org/r/1679667167-16261-1-git-send-email-chiaen_wu%40richtek.com
patch subject: [PATCH] iio: adc: mt6370: Fix ibus and ibat scaling value of some specific vendor ID chips
config: m68k-randconfig-m041-20230329 (https://download.01.org/0day-ci/archive/20230330/202303302231.gNdPKrtD-lkp@intel.com/config)
compiler: m68k-linux-gcc (GCC) 12.1.0

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Link: https://lore.kernel.org/r/202303302231.gNdPKrtD-lkp@intel.com/

smatch warnings:
drivers/iio/adc/mt6370-adc.c:306 mt6370_adc_probe() error: uninitialized symbol 'priv'.

vim +/priv +306 drivers/iio/adc/mt6370-adc.c

c1404d1b659fe3d ChiaEn Wu 2022-10-11  294  static int mt6370_adc_probe(struct platform_device *pdev)
c1404d1b659fe3d ChiaEn Wu 2022-10-11  295  {
c1404d1b659fe3d ChiaEn Wu 2022-10-11  296  	struct device *dev = &pdev->dev;
c1404d1b659fe3d ChiaEn Wu 2022-10-11  297  	struct mt6370_adc_data *priv;
c1404d1b659fe3d ChiaEn Wu 2022-10-11  298  	struct iio_dev *indio_dev;
c1404d1b659fe3d ChiaEn Wu 2022-10-11  299  	struct regmap *regmap;
c1404d1b659fe3d ChiaEn Wu 2022-10-11  300  	int ret;
c1404d1b659fe3d ChiaEn Wu 2022-10-11  301  
c1404d1b659fe3d ChiaEn Wu 2022-10-11  302  	regmap = dev_get_regmap(pdev->dev.parent, NULL);
c1404d1b659fe3d ChiaEn Wu 2022-10-11  303  	if (!regmap)
c1404d1b659fe3d ChiaEn Wu 2022-10-11  304  		return dev_err_probe(dev, -ENODEV, "Failed to get regmap\n");
c1404d1b659fe3d ChiaEn Wu 2022-10-11  305  
9822359d5de2dba ChiaEn Wu 2023-03-24 @306  	ret = mt6370_get_vendor_info(priv);

"priv" is uninitialized.

9822359d5de2dba ChiaEn Wu 2023-03-24  307  	if (ret)
9822359d5de2dba ChiaEn Wu 2023-03-24  308  		return dev_err_probe(dev, ret, "Failed to get vid\n");
9822359d5de2dba ChiaEn Wu 2023-03-24  309  
c1404d1b659fe3d ChiaEn Wu 2022-10-11  310  	indio_dev = devm_iio_device_alloc(dev, sizeof(*priv));
c1404d1b659fe3d ChiaEn Wu 2022-10-11  311  	if (!indio_dev)
c1404d1b659fe3d ChiaEn Wu 2022-10-11  312  		return -ENOMEM;
c1404d1b659fe3d ChiaEn Wu 2022-10-11  313  
c1404d1b659fe3d ChiaEn Wu 2022-10-11  314  	priv = iio_priv(indio_dev);
                                                ^^^^^^^^^^^^^^^^^^^^^^^^^^

c1404d1b659fe3d ChiaEn Wu 2022-10-11  315  	priv->dev = dev;
c1404d1b659fe3d ChiaEn Wu 2022-10-11  316  	priv->regmap = regmap;
c1404d1b659fe3d ChiaEn Wu 2022-10-11  317  	mutex_init(&priv->adc_lock);

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


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

      parent reply	other threads:[~2023-03-30 15:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-24 14:12 [PATCH] iio: adc: mt6370: Fix ibus and ibat scaling value of some specific vendor ID chips ChiaEn Wu
2023-03-24 16:14 ` kernel test robot
2023-03-26 15:56 ` Jonathan Cameron
2023-03-30 15:27 ` Dan Carpenter [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=75f27c56-5e35-40dc-a320-66bf6a8ed36f@kili.mountain \
    --to=error27@gmail.com \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=chiaen_wu@richtek.com \
    --cc=cy_huang@richtek.com \
    --cc=jic23@kernel.org \
    --cc=lars@metafoo.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=lkp@intel.com \
    --cc=matthias.bgg@gmail.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=oe-kbuild@lists.linux.dev \
    --cc=peterwu.pub@gmail.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