mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kbuild test robot <fengguang.wu@intel.com>
To: unlisted-recipients:; (no To-header on input)
Cc: kbuild-all@01.org, linux-kernel@vger.kernel.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Igor Kotrasinski <i.kotrasinsk@samsung.com>,
	Krzysztof Opasiak <k.opasiak@samsung.com>
Subject: drivers/usb/usbip/vudc_sysfs.c:188:30-34: ERROR: udc is NULL but dereferenced.
Date: Tue, 7 Jun 2016 05:05:13 +0800	[thread overview]
Message-ID: <201606070511.UC35geeU%fengguang.wu@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   3613a6245b9fb5091724961e502fd1228de40f32
commit: 9360575c5837cfee841ad350de5be830b840d972 usbip: vudc: Add vudc to Kconfig
date:   6 weeks ago


coccinelle warnings: (new ones prefixed by >>)

>> drivers/usb/usbip/vudc_sysfs.c:188:30-34: ERROR: udc is NULL but dereferenced.
   drivers/usb/usbip/vudc_sysfs.c:201:16-20: ERROR: udc is NULL but dereferenced.

vim +188 drivers/usb/usbip/vudc_sysfs.c

ea6873a4 Igor Kotrasinski 2016-03-08  172  		if (udc->ud.status != SDEV_ST_USED) {
ea6873a4 Igor Kotrasinski 2016-03-08  173  			ret = -EINVAL;
ea6873a4 Igor Kotrasinski 2016-03-08  174  			goto unlock_ud;
ea6873a4 Igor Kotrasinski 2016-03-08  175  		}
ea6873a4 Igor Kotrasinski 2016-03-08  176  		spin_unlock_irq(&udc->ud.lock);
ea6873a4 Igor Kotrasinski 2016-03-08  177  
ea6873a4 Igor Kotrasinski 2016-03-08  178  		usbip_event_add(&udc->ud, VUDC_EVENT_DOWN);
ea6873a4 Igor Kotrasinski 2016-03-08  179  	}
ea6873a4 Igor Kotrasinski 2016-03-08  180  
ea6873a4 Igor Kotrasinski 2016-03-08  181  	spin_unlock_irqrestore(&udc->lock, flags);
ea6873a4 Igor Kotrasinski 2016-03-08  182  
ea6873a4 Igor Kotrasinski 2016-03-08  183  	return count;
ea6873a4 Igor Kotrasinski 2016-03-08  184  
ea6873a4 Igor Kotrasinski 2016-03-08  185  unlock_ud:
ea6873a4 Igor Kotrasinski 2016-03-08  186  	spin_unlock_irq(&udc->ud.lock);
ea6873a4 Igor Kotrasinski 2016-03-08  187  unlock:
ea6873a4 Igor Kotrasinski 2016-03-08 @188  	spin_unlock_irqrestore(&udc->lock, flags);
ea6873a4 Igor Kotrasinski 2016-03-08  189  
ea6873a4 Igor Kotrasinski 2016-03-08  190  	return ret;
ea6873a4 Igor Kotrasinski 2016-03-08  191  }
ea6873a4 Igor Kotrasinski 2016-03-08  192  static DEVICE_ATTR(usbip_sockfd, S_IWUSR, NULL, store_sockfd);
ea6873a4 Igor Kotrasinski 2016-03-08  193  
ea6873a4 Igor Kotrasinski 2016-03-08  194  static ssize_t usbip_status_show(struct device *dev,
ea6873a4 Igor Kotrasinski 2016-03-08  195  			       struct device_attribute *attr, char *out)
ea6873a4 Igor Kotrasinski 2016-03-08  196  {

:::::: The code at line 188 was first introduced by commit
:::::: ea6873a45a22f35c8ab0f9c025df6a6c6dd532f3 usbip: vudc: Add SysFS infrastructure for VUDC

:::::: TO: Igor Kotrasinski <i.kotrasinsk@samsung.com>
:::::: CC: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

                 reply	other threads:[~2016-06-06 22:13 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=201606070511.UC35geeU%fengguang.wu@intel.com \
    --to=fengguang.wu@intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=i.kotrasinsk@samsung.com \
    --cc=k.opasiak@samsung.com \
    --cc=kbuild-all@01.org \
    --cc=linux-kernel@vger.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

all inboxes | Powered by JetHome®