diff options
author | Krzysztof Kozlowski <[email protected]> | 2024-08-14 12:35:47 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <[email protected]> | 2024-09-03 09:52:46 +0200 |
commit | e23593ee41fa4d2f76588dfe609b416c1d9710b8 (patch) | |
tree | b3df255a6be4f3a492e65914ef6c99cf579c0f1c | |
parent | 819c0c31a78e389812ab183eceabec58d1d23319 (diff) |
usb: dwc3: xilinx: simplify with dev_err_probe
Use dev_err_probe() to make the error paths a bit simpler.
Signed-off-by: Krzysztof Kozlowski <[email protected]>
Acked-by: Thinh Nguyen <[email protected]>
Link: https://lore.kernel.org/r/20240814-b4-cleanup-h-of-node-put-usb-v1-11-95481b9682bc@linaro.org
Signed-off-by: Greg Kroah-Hartman <[email protected]>
-rw-r--r-- | drivers/usb/dwc3/dwc3-xilinx.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/usb/dwc3/dwc3-xilinx.c b/drivers/usb/dwc3/dwc3-xilinx.c index f1298b1b4f84..b5e5be424ce9 100644 --- a/drivers/usb/dwc3/dwc3-xilinx.c +++ b/drivers/usb/dwc3/dwc3-xilinx.c @@ -285,11 +285,8 @@ static int dwc3_xlnx_probe(struct platform_device *pdev) return -ENOMEM; regs = devm_platform_ioremap_resource(pdev, 0); - if (IS_ERR(regs)) { - ret = PTR_ERR(regs); - dev_err_probe(dev, ret, "failed to map registers\n"); - return ret; - } + if (IS_ERR(regs)) + return dev_err_probe(dev, PTR_ERR(regs), "failed to map registers\n"); match = of_match_node(dwc3_xlnx_of_match, pdev->dev.of_node); |