summaryrefslogtreecommitdiff
path: root/drivers/phy/allwinner
diff options
context:
space:
mode:
authorVinod Koul <vkoul@kernel.org>2020-07-17 13:45:53 +0530
committerVinod Koul <vkoul@kernel.org>2020-07-17 13:45:53 +0530
commit6cd84cfc8e872ef7521b6fce75d53ef0b232ad04 (patch)
tree5dfc06e9c97050e395e9e06b1d1f7543c59c24be /drivers/phy/allwinner
parentbca21e930451416f92c0c4c679feb9d8fa33c08f (diff)
parent38b1927e5bf9bcad4a2e33189ef1c5569f9599ba (diff)
Merge branch 'fixes' into next
Diffstat (limited to 'drivers/phy/allwinner')
-rw-r--r--drivers/phy/allwinner/phy-sun4i-usb.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/phy/allwinner/phy-sun4i-usb.c b/drivers/phy/allwinner/phy-sun4i-usb.c
index 585d0a59e712..651d5e2a25ce 100644
--- a/drivers/phy/allwinner/phy-sun4i-usb.c
+++ b/drivers/phy/allwinner/phy-sun4i-usb.c
@@ -546,13 +546,14 @@ static void sun4i_usb_phy0_id_vbus_det_scan(struct work_struct *work)
struct sun4i_usb_phy_data *data =
container_of(work, struct sun4i_usb_phy_data, detect.work);
struct phy *phy0 = data->phys[0].phy;
- struct sun4i_usb_phy *phy = phy_get_drvdata(phy0);
+ struct sun4i_usb_phy *phy;
bool force_session_end, id_notify = false, vbus_notify = false;
int id_det, vbus_det;
- if (phy0 == NULL)
+ if (!phy0)
return;
+ phy = phy_get_drvdata(phy0);
id_det = sun4i_usb_phy0_get_id_det(data);
vbus_det = sun4i_usb_phy0_get_vbus_det(data);