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

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

 



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: <stable@xxxxxxxxxxxxxxx> # v4.3+
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@xxxxxxxxxxx>
---
 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

--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]