Skip to content

Commit

Permalink
usb: dwc3: xilinx: simplify with dev_err_probe
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
krzk authored and gregkh committed Sep 3, 2024
1 parent 819c0c3 commit e23593e
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions drivers/usb/dwc3/dwc3-xilinx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit e23593e

Please sign in to comment.