diff options
author | Chen Ni <nichen@iscas.ac.cn> | 2025-04-22 15:37:14 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-04-25 13:21:22 +0200 |
commit | 5cf4f055c5ae257cbfe142ffe9b4b3f7cc7d3d74 (patch) | |
tree | 044f33818a9af958b9e8239b69c3269030a6692c | |
parent | 73fb0ec9436ae87bcae067ce35d6cdd72bade86c (diff) |
usb: gadget: udc: renesas_usb3: remove unnecessary NULL check before phy_exit()
phy_exit() checks for NULL pointers internally.
Remove unneeded NULL check here.
Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
Link: https://lore.kernel.org/r/20250422073714.1334380-1-nichen@iscas.ac.cn
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/usb/gadget/udc/renesas_usb3.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/usb/gadget/udc/renesas_usb3.c b/drivers/usb/gadget/udc/renesas_usb3.c index 89b304cf6d03..3e4d56457597 100644 --- a/drivers/usb/gadget/udc/renesas_usb3.c +++ b/drivers/usb/gadget/udc/renesas_usb3.c @@ -2397,8 +2397,7 @@ static int renesas_usb3_stop(struct usb_gadget *gadget) rzv2m_usb3drd_reset(usb3_to_dev(usb3)->parent, false); renesas_usb3_stop_controller(usb3); - if (usb3->phy) - phy_exit(usb3->phy); + phy_exit(usb3->phy); pm_runtime_put(usb3_to_dev(usb3)); @@ -2984,8 +2983,7 @@ static int renesas_usb3_suspend(struct device *dev) return 0; renesas_usb3_stop_controller(usb3); - if (usb3->phy) - phy_exit(usb3->phy); + phy_exit(usb3->phy); pm_runtime_put(dev); return 0; |