Thread (3 messages) 3 messages, 1 author, 2016-06-27
DORMANTno replies

[PATCH 1/3] usb: renesas_usbhs: Fix a condition about a log of "transceiver found"

From: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Date: 2016-06-27 12:14:38
Also in: stable
Subsystem: the rest, usb subsystem · Maintainers: Linus Torvalds, Greg Kroah-Hartman

This driver should use IS_ERR_OR_NULL() macro for the log. Otherwize,
this driver outputs "transceiver found" even if the gprov->transceiver
has an error from usb_get_phy().

Fixes: b5a2875 ("usb: renesas_usbhs: Allow an OTG PHY driver to provide VBUS")
Cc: <redacted> # v4.3+
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
---
 drivers/usb/renesas_usbhs/mod_gadget.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/renesas_usbhs/mod_gadget.c b/drivers/usb/renesas_usbhs/mod_gadget.c
index 50f3363..6e60297 100644
--- a/drivers/usb/renesas_usbhs/mod_gadget.c
+++ b/drivers/usb/renesas_usbhs/mod_gadget.c
@@ -1073,7 +1073,7 @@ int usbhs_mod_gadget_probe(struct usbhs_priv *priv)
 
 	gpriv->transceiver = usb_get_phy(USB_PHY_TYPE_UNDEFINED);
 	dev_info(dev, "%stransceiver found\n",
-		 gpriv->transceiver ? "" : "no ");
+		 !IS_ERR_OR_NULL(gpriv->transceiver) ? "" : "no ");
 
 	/*
 	 * CAUTION
-- 
1.9.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help