mirror of
https://github.com/torvalds/linux.git
synced 2026-06-07 14:04:54 +02:00
FROMGIT: usb: dwc3: keystone: Simplify with dev_err_probe()
Common pattern of handling deferred probe can be simplified with
dev_err_probe(). Less code and the error value gets printed.
Acked-by: Felipe Balbi <balbi@kernel.org>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20210111135539.57234-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 370e3d5b71
https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-next)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I239315c1ad463e6fc0660adc788a6ec4f6057d1f
This commit is contained in:
parent
b013254308
commit
ca08536f9b
|
|
@ -99,13 +99,8 @@ static int kdwc3_probe(struct platform_device *pdev)
|
|||
|
||||
/* PSC dependency on AM65 needs SERDES0 to be powered before USB0 */
|
||||
kdwc->usb3_phy = devm_phy_optional_get(dev, "usb3-phy");
|
||||
if (IS_ERR(kdwc->usb3_phy)) {
|
||||
error = PTR_ERR(kdwc->usb3_phy);
|
||||
if (error != -EPROBE_DEFER)
|
||||
dev_err(dev, "couldn't get usb3 phy: %d\n", error);
|
||||
|
||||
return error;
|
||||
}
|
||||
if (IS_ERR(kdwc->usb3_phy))
|
||||
return dev_err_probe(dev, PTR_ERR(kdwc->usb3_phy), "couldn't get usb3 phy\n");
|
||||
|
||||
phy_pm_runtime_get_sync(kdwc->usb3_phy);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user