lkml.org 
[lkml]   [2020]   [Nov]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] usb: Assign NULL ​​to phy that may be returned
Date
Assign initial values ​​to local variables that may be returned

Signed-off-by: Wang Qing <wangqing@vivo.com>
---
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
\
 
 \ /
  Last update: 2020-11-06 04:17    [W:0.049 / U:0.244 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site