From: kbuild test robot <lkp@intel.com>
To: kernel-janitors@vger.kernel.org
Subject: Re: [patch v2] usb: gadget: f_midi: missing unlock on error path
Date: Tue, 05 Jan 2016 11:53:47 +0000 [thread overview]
Message-ID: <201601051926.BEbGcnh7%fengguang.wu@intel.com> (raw)
In-Reply-To: <20160105102809.GA26420@mwanda>
Hi Dan,
[auto build test WARNING on balbi-usb/next]
[also build test WARNING on v4.4-rc8 next-20160105]
[if your patch is applied to the wrong git tree, please drop us a note to help improving the system]
url: https://github.com/0day-ci/linux/commits/Dan-Carpenter/usb-gadget-f_midi-missing-unlock-on-error-path/20160105-183115
base: https://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git next
coccinelle warnings: (new ones prefixed by >>)
>> drivers/usb/gadget/function/f_midi.c:1233:14-21: ERROR: midi is NULL but dereferenced.
vim +1233 drivers/usb/gadget/function/f_midi.c
e1e3d7ec Felipe F. Tonello 2015-12-01 1217
6f1de344 Andrzej Pietrasiewicz 2014-10-16 1218 ++opts->refcnt;
6f1de344 Andrzej Pietrasiewicz 2014-10-16 1219 mutex_unlock(&opts->lock);
b85e9de9 Andrzej Pietrasiewicz 2014-10-16 1220
b85e9de9 Andrzej Pietrasiewicz 2014-10-16 1221 midi->func.name = "gmidi function";
b85e9de9 Andrzej Pietrasiewicz 2014-10-16 1222 midi->func.bind = f_midi_bind;
b85e9de9 Andrzej Pietrasiewicz 2014-10-16 1223 midi->func.unbind = f_midi_unbind;
b85e9de9 Andrzej Pietrasiewicz 2014-10-16 1224 midi->func.set_alt = f_midi_set_alt;
b85e9de9 Andrzej Pietrasiewicz 2014-10-16 1225 midi->func.disable = f_midi_disable;
b85e9de9 Andrzej Pietrasiewicz 2014-10-16 1226 midi->func.free_func = f_midi_free;
b85e9de9 Andrzej Pietrasiewicz 2014-10-16 1227
b85e9de9 Andrzej Pietrasiewicz 2014-10-16 1228 return &midi->func;
b85e9de9 Andrzej Pietrasiewicz 2014-10-16 1229
b85e9de9 Andrzej Pietrasiewicz 2014-10-16 1230 setup_fail:
39920a18 Dan Carpenter 2016-01-05 1231 mutex_unlock(&opts->lock);
b85e9de9 Andrzej Pietrasiewicz 2014-10-16 1232 for (--i; i >= 0; i--)
b85e9de9 Andrzej Pietrasiewicz 2014-10-16 @1233 kfree(midi->in_port[i]);
b85e9de9 Andrzej Pietrasiewicz 2014-10-16 1234 kfree(midi);
b85e9de9 Andrzej Pietrasiewicz 2014-10-16 1235 return ERR_PTR(status);
b85e9de9 Andrzej Pietrasiewicz 2014-10-16 1236 }
b85e9de9 Andrzej Pietrasiewicz 2014-10-16 1237
b85e9de9 Andrzej Pietrasiewicz 2014-10-16 1238 DECLARE_USB_FUNCTION_INIT(midi, f_midi_alloc_inst, f_midi_alloc);
:::::: The code at line 1233 was first introduced by commit
:::::: b85e9de9e818de0dcbc50b7b4242192eb6194855 usb: gadget: f_midi: convert to new function interface with backward compatibility
:::::: TO: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
:::::: CC: Felipe Balbi <balbi@ti.com>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
next prev parent reply other threads:[~2016-01-05 11:53 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-05 10:28 [patch v2] usb: gadget: f_midi: missing unlock on error path Dan Carpenter
2016-01-05 11:53 ` kbuild test robot [this message]
2016-01-05 12:28 ` Julia Lawall
2016-01-05 12:37 ` Dan Carpenter
2016-01-05 12:44 ` Dan Carpenter
2016-01-05 13:55 ` Michal Nazarewicz
2016-01-05 14:03 ` Dan Carpenter
2016-01-05 20:51 ` Felipe Ferreri Tonello
2016-01-05 21:21 ` Julia Lawall
2016-01-05 22:08 ` Dan Carpenter
2016-01-06 0:02 ` Michal Nazarewicz
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=201601051926.BEbGcnh7%fengguang.wu@intel.com \
--to=lkp@intel.com \
--cc=kernel-janitors@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 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.