mirror of
https://github.com/hardkernel/kernel_common_drivers.git
synced 2026-06-25 12:03:48 +09:00
usb: clean usb coverity [1/1]
PD#SWPL-190835 Problem: clean usb coverity Solution: clean usb coverity Verify: all Change-Id: I0522381ae418c83e1024c4edc1ca31eec2f6870b Signed-off-by: he.he <he.he@amlogic.com>
This commit is contained in:
@@ -89,17 +89,18 @@ static int crg_core_soft_reset(struct crg_drd *crg)
|
||||
if (crg->usb3_phy)
|
||||
usb_phy_init(crg->usb3_phy);
|
||||
|
||||
amlogic_crg_host_power(crg->usb2_phy, false, true);
|
||||
if (crg->usb2_phy)
|
||||
amlogic_crg_host_power(crg->usb2_phy, false, true);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void crg_core_exit(struct crg_drd *crg)
|
||||
{
|
||||
amlogic_crg_host_power(crg->usb2_phy, false, false);
|
||||
|
||||
if (crg->usb2_phy)
|
||||
if (crg->usb2_phy) {
|
||||
amlogic_crg_host_power(crg->usb2_phy, false, false);
|
||||
usb_phy_shutdown(crg->usb2_phy);
|
||||
}
|
||||
if (crg->usb3_phy)
|
||||
usb_phy_shutdown(crg->usb3_phy);
|
||||
|
||||
|
||||
@@ -1075,8 +1075,6 @@ void stop_ep_cmd_work(struct work_struct *work)
|
||||
struct aml_xhci_virt_ep *eps =
|
||||
container_of(work, struct aml_xhci_virt_ep, stop_work);
|
||||
|
||||
if (!eps)
|
||||
return;
|
||||
xhci = eps->xhci;
|
||||
if (eps->q_status_count == 0)
|
||||
eps->q_status_count = 12;
|
||||
@@ -1085,13 +1083,9 @@ void stop_ep_cmd_work(struct work_struct *work)
|
||||
u16 stat;
|
||||
|
||||
udev = eps->udev;
|
||||
if (!udev)
|
||||
return;
|
||||
if (udev->state == USB_STATE_NOTATTACHED)
|
||||
return;
|
||||
for (i = 0; i < eps->q_status_count; i++) {
|
||||
if (!udev)
|
||||
return;
|
||||
if (udev->state == USB_STATE_NOTATTACHED)
|
||||
return;
|
||||
aml_xhci_usb_get_status(udev, USB_RECIP_ENDPOINT,
|
||||
|
||||
@@ -179,8 +179,6 @@ int aml_xhci_start(struct aml_xhci_hcd *xhci)
|
||||
temp = readl(hcd->regs + 0x20b0);
|
||||
temp |= 1 << 26;
|
||||
writel(temp, hcd->regs + 0x20b0);
|
||||
temp = readl(hcd->regs + 0x20b0);
|
||||
temp = 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user