From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild@lists.01.org, Kyle Tso <kyletso@google.com>,
linux@roeck-us.net, heikki.krogerus@linux.intel.com,
gregkh@linuxfoundation.org
Cc: lkp@intel.com, kbuild-all@lists.01.org, badhri@google.com,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
Kyle Tso <kyletso@google.com>
Subject: Re: [PATCH v3] usb: typec: tcpm: Export partner Source Capabilities
Date: Mon, 15 Feb 2021 16:37:44 +0300 [thread overview]
Message-ID: <20210215133744.GQ2087@kadam> (raw)
In-Reply-To: <20210214111730.1436506-1-kyletso@google.com>
[-- Attachment #1: Type: text/plain, Size: 2171 bytes --]
Hi Kyle,
url: https://github.com/0day-ci/linux/commits/Kyle-Tso/usb-typec-tcpm-Export-partner-Source-Capabilities/20210214-192125
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing
config: i386-randconfig-m021-20210214 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 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>
smatch warnings:
drivers/usb/typec/tcpm/tcpm.c:5770 tcpm_get_partner_src_caps() warn: variable dereferenced before check 'src_pdo' (see line 5769)
vim +/src_pdo +5770 drivers/usb/typec/tcpm/tcpm.c
bfd31a180a3d55 Kyle Tso 2021-02-14 5759 int tcpm_get_partner_src_caps(struct tcpm_port *port, u32 **src_pdo)
bfd31a180a3d55 Kyle Tso 2021-02-14 5760 {
bfd31a180a3d55 Kyle Tso 2021-02-14 5761 unsigned int nr_pdo;
bfd31a180a3d55 Kyle Tso 2021-02-14 5762
bfd31a180a3d55 Kyle Tso 2021-02-14 5763 mutex_lock(&port->lock);
bfd31a180a3d55 Kyle Tso 2021-02-14 5764 if (port->nr_source_caps == 0) {
bfd31a180a3d55 Kyle Tso 2021-02-14 5765 mutex_unlock(&port->lock);
bfd31a180a3d55 Kyle Tso 2021-02-14 5766 return -ENODATA;
bfd31a180a3d55 Kyle Tso 2021-02-14 5767 }
bfd31a180a3d55 Kyle Tso 2021-02-14 5768
bfd31a180a3d55 Kyle Tso 2021-02-14 @5769 *src_pdo = kcalloc(port->nr_source_caps, sizeof(u32), GFP_KERNEL);
bfd31a180a3d55 Kyle Tso 2021-02-14 @5770 if (!src_pdo) {
Typo. Missing * char.
bfd31a180a3d55 Kyle Tso 2021-02-14 5771 mutex_unlock(&port->lock);
bfd31a180a3d55 Kyle Tso 2021-02-14 5772 return -ENOMEM;
bfd31a180a3d55 Kyle Tso 2021-02-14 5773 }
bfd31a180a3d55 Kyle Tso 2021-02-14 5774
bfd31a180a3d55 Kyle Tso 2021-02-14 5775 nr_pdo = tcpm_copy_pdos(*src_pdo, port->source_caps,
bfd31a180a3d55 Kyle Tso 2021-02-14 5776 port->nr_source_caps);
bfd31a180a3d55 Kyle Tso 2021-02-14 5777 mutex_unlock(&port->lock);
bfd31a180a3d55 Kyle Tso 2021-02-14 5778 return nr_pdo;
bfd31a180a3d55 Kyle Tso 2021-02-14 5779 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 30496 bytes --]
next prev parent reply other threads:[~2021-02-15 17:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-14 11:17 [PATCH v3] usb: typec: tcpm: Export partner Source Capabilities Kyle Tso
2021-02-15 13:37 ` Dan Carpenter [this message]
2021-03-02 7:12 ` Greg KH
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=20210215133744.GQ2087@kadam \
--to=dan.carpenter@oracle.com \
--cc=badhri@google.com \
--cc=gregkh@linuxfoundation.org \
--cc=heikki.krogerus@linux.intel.com \
--cc=kbuild-all@lists.01.org \
--cc=kbuild@lists.01.org \
--cc=kyletso@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=linux@roeck-us.net \
--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;
as well as URLs for NNTP newsgroup(s).