Skip to content

Commit e23593e

Browse files
krzkgregkh
authored andcommitted
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 <krzysztof.kozlowski@linaro.org> Acked-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com> 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 <gregkh@linuxfoundation.org>
1 parent 819c0c3 commit e23593e

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

drivers/usb/dwc3/dwc3-xilinx.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -285,11 +285,8 @@ static int dwc3_xlnx_probe(struct platform_device *pdev)
285285
return -ENOMEM;
286286

287287
regs = devm_platform_ioremap_resource(pdev, 0);
288-
if (IS_ERR(regs)) {
289-
ret = PTR_ERR(regs);
290-
dev_err_probe(dev, ret, "failed to map registers\n");
291-
return ret;
292-
}
288+
if (IS_ERR(regs))
289+
return dev_err_probe(dev, PTR_ERR(regs), "failed to map registers\n");
293290

294291
match = of_match_node(dwc3_xlnx_of_match, pdev->dev.of_node);
295292

0 commit comments

Comments
 (0)