summaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2020-09-28 17:34:31 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2020-09-29 08:41:53 +0200
commit9699096f1eccd742d898f471b046181ea90dd582 (patch)
tree1b62f4c159a6ae9b90eac7d750a4833b0e30a7dc /drivers/usb
parent12d74001d52911dfb96d81b774183aeaba21370c (diff)
downloadbarebox-9699096f1eccd742d898f471b046181ea90dd582.tar.gz
barebox-9699096f1eccd742d898f471b046181ea90dd582.tar.xz
treewide: replace strerror(-PTR_ERR(errno)) with %pe format specifier
Using %pe instead of PTR_ERR has the benefit of being less verbose and less error-prone (no negation necessary) while potentially reducing code size. Make use of it. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/imx/chipidea-imx.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/usb/imx/chipidea-imx.c b/drivers/usb/imx/chipidea-imx.c
index 635be02929..b1a77a1637 100644
--- a/drivers/usb/imx/chipidea-imx.c
+++ b/drivers/usb/imx/chipidea-imx.c
@@ -277,9 +277,8 @@ static int imx_chipidea_probe(struct device_d *dev)
if (of_property_read_bool(dev->device_node, "fsl,usbphy")) {
ci->phy = of_phy_get_by_phandle(dev, "fsl,usbphy", 0);
if (IS_ERR(ci->phy)) {
- ret = PTR_ERR(ci->phy);
- dev_err(dev, "Cannot get phy: %s\n", strerror(-ret));
- return ret;
+ dev_err(dev, "Cannot get phy: %pe\n", ci->phy);
+ return PTR_ERR(ci->phy);
} else {
ci->usbphy = phy_to_usbphy(ci->phy);
if (IS_ERR(ci->usbphy))