From: Wang Qing <wangqing@vivo.com>
To: Felipe Balbi <balbi@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Wang Qing <wangqing@vivo.com>
Subject: [PATCH] usb: Assign NULL to phy that may be returned
Date: Fri, 6 Nov 2020 11:15:55 +0800 [thread overview]
Message-ID: <1604632555-18497-1-git-send-email-wangqing@vivo.com> (raw)
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
next reply other threads:[~2020-11-06 3:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-06 3:15 Wang Qing [this message]
2020-11-06 6:51 ` Greg Kroah-Hartman
2020-11-06 7:39 ` 王擎
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1604632555-18497-1-git-send-email-wangqing@vivo.com \
--to=wangqing@vivo.com \
--cc=balbi@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®