[PATCH] usb: Assign NULL ​​to phy that may be returned

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

 



Assign initial values ​​to local variables that may be returned

Signed-off-by: Wang Qing <wangqing@xxxxxxxx>
---
 drivers/usb/phy/phy.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/phy/phy.c b/drivers/usb/phy/phy.c
index b47285f..de21967
--- a/drivers/usb/phy/phy.c
+++ b/drivers/usb/phy/phy.c
@@ -59,7 +59,7 @@ static struct usb_phy *__usb_find_phy(struct list_head *list,
 
 static struct usb_phy *__of_usb_find_phy(struct device_node *node)
 {
-	struct usb_phy  *phy;
+	struct usb_phy  *phy = NULL;
 
 	if (!of_device_is_available(node))
 		return ERR_PTR(-ENODEV);
-- 
2.7.4




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux