usb: gadget: udc: renesas_usb3: remove unnecessary NULL check before phy_exit()
authorChen Ni <nichen@iscas.ac.cn>
Tue, 22 Apr 2025 07:37:14 +0000 (15:37 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 25 Apr 2025 11:21:22 +0000 (13:21 +0200)
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>
drivers/usb/gadget/udc/renesas_usb3.c

index 89b304cf6d032f5162abfd1b8c60a930f3a12694..3e4d5645759791e420798084cbcbd01844b4d7e4 100644 (file)
@@ -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;