All of lore.kernel.org
 help / color / mirror / Atom feed
* [mcgrof-next:20210823-for-axboe-add-disk-error-handling-next 41/70] drivers/block/rsxx/dev.c:212:6: warning: Uninitialized variable: err [uninitvar]
@ 2021-08-24  2:20 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-08-24  2:20 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 3026 bytes --]

CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Luis Chamberlain <mcgrof@kernel.org>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux-next.git 20210823-for-axboe-add-disk-error-handling-next
head:   4b448d7532233530f59b5bf8a184b4b3d0acc73f
commit: 830cca58563fc304bc786521664a0d4fdb101e78 [41/70] block/rsxx: add error handling support for add_disk()
:::::: branch date: 6 hours ago
:::::: commit date: 6 hours ago
compiler: microblaze-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>


cppcheck possible warnings: (new ones prefixed by >>, may not real problems)

>> drivers/block/rsxx/dev.c:212:6: warning: Uninitialized variable: err [uninitvar]
    if (err)
        ^

vim +212 drivers/block/rsxx/dev.c

8722ff8cdbfac9 josh.h.morris(a)us.ibm.com 2013-02-05  192  
8722ff8cdbfac9 josh.h.morris(a)us.ibm.com 2013-02-05  193  int rsxx_attach_dev(struct rsxx_cardinfo *card)
8722ff8cdbfac9 josh.h.morris(a)us.ibm.com 2013-02-05  194  {
830cca58563fc3 Luis Chamberlain         2021-07-13  195  	int err;
830cca58563fc3 Luis Chamberlain         2021-07-13  196  
8722ff8cdbfac9 josh.h.morris(a)us.ibm.com 2013-02-05  197  	mutex_lock(&card->dev_lock);
8722ff8cdbfac9 josh.h.morris(a)us.ibm.com 2013-02-05  198  
8722ff8cdbfac9 josh.h.morris(a)us.ibm.com 2013-02-05  199  	/* The block device requires the stripe size from the config. */
8722ff8cdbfac9 josh.h.morris(a)us.ibm.com 2013-02-05  200  	if (enable_blkdev) {
8722ff8cdbfac9 josh.h.morris(a)us.ibm.com 2013-02-05  201  		if (card->config_valid)
8722ff8cdbfac9 josh.h.morris(a)us.ibm.com 2013-02-05  202  			set_capacity(card->gendisk, card->size8 >> 9);
8722ff8cdbfac9 josh.h.morris(a)us.ibm.com 2013-02-05  203  		else
8722ff8cdbfac9 josh.h.morris(a)us.ibm.com 2013-02-05  204  			set_capacity(card->gendisk, 0);
830cca58563fc3 Luis Chamberlain         2021-07-13  205  		err = device_add_disk(CARD_TO_DEV(card), card->gendisk, NULL);
830cca58563fc3 Luis Chamberlain         2021-07-13  206  		if (err == 0)
8722ff8cdbfac9 josh.h.morris(a)us.ibm.com 2013-02-05  207  			card->bdev_attached = 1;
8722ff8cdbfac9 josh.h.morris(a)us.ibm.com 2013-02-05  208  	}
8722ff8cdbfac9 josh.h.morris(a)us.ibm.com 2013-02-05  209  
8722ff8cdbfac9 josh.h.morris(a)us.ibm.com 2013-02-05  210  	mutex_unlock(&card->dev_lock);
8722ff8cdbfac9 josh.h.morris(a)us.ibm.com 2013-02-05  211  
830cca58563fc3 Luis Chamberlain         2021-07-13 @212  	if (err)
830cca58563fc3 Luis Chamberlain         2021-07-13  213  		blk_cleanup_disk(card->gendisk);
830cca58563fc3 Luis Chamberlain         2021-07-13  214  
830cca58563fc3 Luis Chamberlain         2021-07-13  215  	return err;
8722ff8cdbfac9 josh.h.morris(a)us.ibm.com 2013-02-05  216  }
8722ff8cdbfac9 josh.h.morris(a)us.ibm.com 2013-02-05  217  

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-08-24  2:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-08-24  2:20 [mcgrof-next:20210823-for-axboe-add-disk-error-handling-next 41/70] drivers/block/rsxx/dev.c:212:6: warning: Uninitialized variable: err [uninitvar] kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.