summaryrefslogtreecommitdiffstats
path: root/drivers/usb/imx/imx-usb-phy.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2015-09-10 12:04:02 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2015-09-23 17:12:44 +0200
commit7e44c8495ace5dc2dfd9f183e7956fca3661a614 (patch)
tree28aec094a44c002d20629bedb5ff5eec3cc398ae /drivers/usb/imx/imx-usb-phy.c
parent9d54b6f6b6c42b7078ba8619444089507a0563f3 (diff)
downloadbarebox-7e44c8495ace5dc2dfd9f183e7956fca3661a614.tar.gz
barebox-7e44c8495ace5dc2dfd9f183e7956fca3661a614.tar.xz
introduce strerrorp
putting an error pointer into strerror can be a bit confusing since strerror takes a positive error code but PTR_ERR returns a negative number, so we have to do strerror(-PTR_ERR(errp)). Some places got this wrong already, so introduce a strerrorp function which directly takes an error pointer. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/usb/imx/imx-usb-phy.c')
-rw-r--r--drivers/usb/imx/imx-usb-phy.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/imx/imx-usb-phy.c b/drivers/usb/imx/imx-usb-phy.c
index a573c7fe52..837c1b5176 100644
--- a/drivers/usb/imx/imx-usb-phy.c
+++ b/drivers/usb/imx/imx-usb-phy.c
@@ -78,7 +78,7 @@ static int imx_usbphy_probe(struct device_d *dev)
imxphy->clk = clk_get(dev, NULL);
if (IS_ERR(imxphy->clk)) {
- dev_err(dev, "could not get clk: %s\n", strerror(-PTR_ERR(imxphy->clk)));
+ dev_err(dev, "could not get clk: %s\n", strerrorp(imxphy->clk));
goto err_clk;
}