All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: [mcgrof-next:20210823-for-axboe-add-disk-error-handling-next 41/70] drivers/block/rsxx/dev.c:212:6: warning: Uninitialized variable: err [uninitvar]
Date: Tue, 24 Aug 2021 10:20:39 +0800	[thread overview]
Message-ID: <202108241033.Ly5zufPy-lkp@intel.com> (raw)

[-- 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

                 reply	other threads:[~2021-08-24  2:20 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=202108241033.Ly5zufPy-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild@lists.01.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 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.