]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
usb: gadget: pch_udc: Initialize device pointer before use
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Tue, 23 Mar 2021 15:36:25 +0000 (17:36 +0200)
committerKelsey Skunberg <kelsey.skunberg@canonical.com>
Mon, 24 May 2021 23:46:21 +0000 (17:46 -0600)
commita835601023cfd53516c4dbcca4a40f4ed840d583
tree801f22f2ca7ac3e4071fae08379031aae0f964b2
parent67a76c31cab69f943f4ed4409ae1121c909b330f
usb: gadget: pch_udc: Initialize device pointer before use

BugLink: https://bugs.launchpad.net/bugs/1929455
[ Upstream commit 971d080212be4ce2b91047d25a657f46d3e39635 ]

During conversion to use GPIO descriptors the device pointer,
which is applied to devm_gpiod_get(), is not yet initialized.

Move initialization in the ->probe() in order to have it set before use.

Fixes: e20849a8c883 ("usb: gadget: pch_udc: Convert to use GPIO descriptors")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20210323153626.54908-6-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kelsey Skunberg <kelsey.skunberg@canonical.com>
drivers/usb/gadget/udc/pch_udc.c