linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild@lists.01.org, Luis Chamberlain <mcgrof@kernel.org>
Cc: lkp@intel.com, kbuild-all@lists.01.org, linux-kernel@vger.kernel.org
Subject: [mcgrof-next:20210820-add-disk-error-handling-next 89/90] drivers/block/floppy.c:4540 floppy_probe() error: uninitialized symbol 'err'.
Date: Fri, 27 Aug 2021 11:08:35 +0300	[thread overview]
Message-ID: <202108271344.eCzod273-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux-next.git 20210820-add-disk-error-handling-next
head:   9a845121f1e14033032e7cbb772ca21f24be0cb3
commit: b08dbe6faf0fc2f3589d5e9b191899b7d9ab0b6d [89/90] block: make __register_blkdev() return an error
config: i386-randconfig-m021-20210827 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 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>

New smatch warnings:
drivers/block/floppy.c:4540 floppy_probe() error: uninitialized symbol 'err'.

Old smatch warnings:
drivers/block/floppy.c:2794 redo_fd_request() error: we previously assumed 'current_req' could be null (see line 2782)
drivers/block/floppy.c:3543 fd_locked_ioctl() error: uninitialized symbol 'outparam'.

vim +/err +4540 drivers/block/floppy.c

b08dbe6faf0fc2 Luis Chamberlain  2021-07-14  4520  static int floppy_probe(dev_t dev)
302cfee150291c Christoph Hellwig 2020-10-29  4521  {
302cfee150291c Christoph Hellwig 2020-10-29  4522  	unsigned int drive = (MINOR(dev) & 3) | ((MINOR(dev) & 0x80) >> 5);
302cfee150291c Christoph Hellwig 2020-10-29  4523  	unsigned int type = (MINOR(dev) >> 2) & 0x1f;
b08dbe6faf0fc2 Luis Chamberlain  2021-07-14  4524  	int err;
302cfee150291c Christoph Hellwig 2020-10-29  4525  
302cfee150291c Christoph Hellwig 2020-10-29  4526  	if (drive >= N_DRIVE || !floppy_available(drive) ||
302cfee150291c Christoph Hellwig 2020-10-29  4527  	    type >= ARRAY_SIZE(floppy_type))
b08dbe6faf0fc2 Luis Chamberlain  2021-07-14  4528  		return -EINVAL;
302cfee150291c Christoph Hellwig 2020-10-29  4529  
302cfee150291c Christoph Hellwig 2020-10-29  4530  	mutex_lock(&floppy_probe_lock);
302cfee150291c Christoph Hellwig 2020-10-29  4531  	if (!disks[drive][type]) {
b08dbe6faf0fc2 Luis Chamberlain  2021-07-14  4532  		if (floppy_alloc_disk(drive, type) == 0) {
b08dbe6faf0fc2 Luis Chamberlain  2021-07-14  4533  			err = add_disk(disks[drive][type]);
b08dbe6faf0fc2 Luis Chamberlain  2021-07-14  4534  			if (err)
b08dbe6faf0fc2 Luis Chamberlain  2021-07-14  4535  				blk_cleanup_disk(disks[drive][type]);
b08dbe6faf0fc2 Luis Chamberlain  2021-07-14  4536  		}

"err" not set on else path.

302cfee150291c Christoph Hellwig 2020-10-29  4537  	}
302cfee150291c Christoph Hellwig 2020-10-29  4538  	mutex_unlock(&floppy_probe_lock);
b08dbe6faf0fc2 Luis Chamberlain  2021-07-14  4539  
b08dbe6faf0fc2 Luis Chamberlain  2021-07-14 @4540  	return err;
^1da177e4c3f41 Linus Torvalds    2005-04-16  4541  }

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


                 reply	other threads:[~2021-08-27  8:09 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=202108271344.eCzod273-lkp@intel.com \
    --to=dan.carpenter@oracle.com \
    --cc=kbuild-all@lists.01.org \
    --cc=kbuild@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=mcgrof@kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).