[PATCH linux-next v1] PCI: rockchip: Improve error handling in clock return value

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Updates the error message to include the actual return value of
devm_clk_bulk_get_all, which provides more context for debugging
and troubleshooting the root cause of clock retrieval failures.

Reported-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
Closes: https://lore.kernel.org/r/202501040409.SUV09R80-lkp@xxxxxxxxx/
Signed-off-by: Anand Moon <linux.amoon@xxxxxxxxx>
---
 drivers/pci/controller/pcie-rockchip.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/pci/controller/pcie-rockchip.c b/drivers/pci/controller/pcie-rockchip.c
index fea867c24f75..ca6163f9d2dd 100644
--- a/drivers/pci/controller/pcie-rockchip.c
+++ b/drivers/pci/controller/pcie-rockchip.c
@@ -99,7 +99,8 @@ int rockchip_pcie_parse_dt(struct rockchip_pcie *rockchip)
 
 	rockchip->num_clks = devm_clk_bulk_get_all(dev, &rockchip->clks);
 	if (rockchip->num_clks < 0)
-		return dev_err_probe(dev, err, "failed to get clocks\n");
+		return dev_err_probe(dev, rockchip->num_clks,
+				     "failed to get clocks\n");
 
 	return 0;
 }
-- 
2.47.1





[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux