Files
linux/drivers
Colin Ian King 380d05ee26 usb: gadget: don't dereference g until after it has been null checked
[ Upstream commit b2fc059fa5 ]

Avoid dereferencing pointer g until after g has been sanity null checked;
move the assignment of cdev much later when it is required into a more
local scope.

Detected by CoverityScan, CID#1222135 ("Dereference before null check")

Fixes: b785ea7ce6 ("usb: gadget: composite: fix ep->maxburst initialization")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-03 17:04:29 +01:00
..
2017-12-16 10:33:55 +01:00
2018-01-10 09:27:08 +01:00
2017-12-16 10:33:53 +01:00
2017-11-30 08:37:27 +00:00
2016-09-24 10:07:35 +02:00
2018-02-03 17:04:29 +01:00
2018-01-02 20:33:20 +01:00