mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild@lists.01.org, Antoniu Miclaus <antoniu.miclaus@analog.com>
Cc: lkp@intel.com, kbuild-all@lists.01.org,
	linux-kernel@vger.kernel.org,
	Jonathan Cameron <Jonathan.Cameron@huawei.com>,
	Cai Huoqing <cai.huoqing@linux.dev>
Subject: drivers/iio/dac/ad7293.c:524 ad7293_read_raw() error: uninitialized symbol 'data'.
Date: Mon, 24 Jan 2022 15:05:43 +0300	[thread overview]
Message-ID: <202201241944.dodYYcTk-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   dd81e1c7d5fb126e5fbc5c9e334d7b3ec29a16a0
commit: 0bb12606c05fe9737e3056fe76d6e4b9c2a87b57 iio:dac:ad7293: add support for AD7293
config: nios2-randconfig-m031-20220124 (https://download.01.org/0day-ci/archive/20220124/202201241944.dodYYcTk-lkp@intel.com/config)
compiler: nios2-linux-gcc (GCC) 11.2.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/dac/ad7293.c:524 ad7293_read_raw() error: uninitialized symbol 'data'.

vim +/data +524 drivers/iio/dac/ad7293.c

0bb12606c05fe9 Antoniu Miclaus 2021-12-02  510  		if (ret)
0bb12606c05fe9 Antoniu Miclaus 2021-12-02  511  			return ret;
0bb12606c05fe9 Antoniu Miclaus 2021-12-02  512  
0bb12606c05fe9 Antoniu Miclaus 2021-12-02  513  		*val = data;
0bb12606c05fe9 Antoniu Miclaus 2021-12-02  514  
0bb12606c05fe9 Antoniu Miclaus 2021-12-02  515  		return IIO_VAL_INT;
0bb12606c05fe9 Antoniu Miclaus 2021-12-02  516  	case IIO_CHAN_INFO_OFFSET:
0bb12606c05fe9 Antoniu Miclaus 2021-12-02  517  		switch (chan->type) {
0bb12606c05fe9 Antoniu Miclaus 2021-12-02  518  		case IIO_VOLTAGE:
0bb12606c05fe9 Antoniu Miclaus 2021-12-02  519  			if (chan->output) {
0bb12606c05fe9 Antoniu Miclaus 2021-12-02  520  				ret = ad7293_get_offset(st,
0bb12606c05fe9 Antoniu Miclaus 2021-12-02  521  							chan->channel + AD7293_VOUT_MIN_OFFSET_CH,
0bb12606c05fe9 Antoniu Miclaus 2021-12-02  522  							&data);

ad7293_get_offset() can fail

0bb12606c05fe9 Antoniu Miclaus 2021-12-02  523  
0bb12606c05fe9 Antoniu Miclaus 2021-12-02 @524  				data = FIELD_GET(AD7293_REG_VOUT_OFFSET_MSK, data);
0bb12606c05fe9 Antoniu Miclaus 2021-12-02  525  			} else {
0bb12606c05fe9 Antoniu Miclaus 2021-12-02  526  				ret = ad7293_get_offset(st, chan->channel, &data);
0bb12606c05fe9 Antoniu Miclaus 2021-12-02  527  			}
0bb12606c05fe9 Antoniu Miclaus 2021-12-02  528  
0bb12606c05fe9 Antoniu Miclaus 2021-12-02  529  			break;
0bb12606c05fe9 Antoniu Miclaus 2021-12-02  530  		case IIO_CURRENT:
0bb12606c05fe9 Antoniu Miclaus 2021-12-02  531  			ret = ad7293_get_offset(st,
0bb12606c05fe9 Antoniu Miclaus 2021-12-02  532  						chan->channel + AD7293_ISENSE_MIN_OFFSET_CH,
0bb12606c05fe9 Antoniu Miclaus 2021-12-02  533  						&data);
0bb12606c05fe9 Antoniu Miclaus 2021-12-02  534  
0bb12606c05fe9 Antoniu Miclaus 2021-12-02  535  			break;

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org


                 reply	other threads:[~2022-01-24 12:06 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=202201241944.dodYYcTk-lkp@intel.com \
    --to=dan.carpenter@oracle.com \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=antoniu.miclaus@analog.com \
    --cc=cai.huoqing@linux.dev \
    --cc=kbuild-all@lists.01.org \
    --cc=kbuild@lists.01.org \
    --cc=linux-kernel@vger.kernel.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

Powered by JetHome