[PATCH] usb: musb: Remove unnecessary check of musb->hcd in musb_handle_intr_connect()
From: Jia-Ju Bai
Date: Tue Dec 17 2019 - 04:51:33 EST
In musb_handle_intr_connect(), musb->hcd should be non-null,
so the check of musb->hcd on line 783 could be dropped.
Thank Greg for good advice.
Signed-off-by: Jia-Ju Bai <baijiaju1990@xxxxxxxxx>
---
drivers/usb/musb/musb_core.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
index 15cca912c53e..ce57f253a8e1 100644
--- a/drivers/usb/musb/musb_core.c
+++ b/drivers/usb/musb/musb_core.c
@@ -780,8 +780,7 @@ static void musb_handle_intr_connect(struct musb *musb, u8 devctl, u8 int_usb)
musb_dbg(musb, "HNP: CONNECT, now b_host");
b_host:
musb->xceiv->otg->state = OTG_STATE_B_HOST;
- if (musb->hcd)
- musb->hcd->self.is_b_host = 1;
+ musb->hcd->self.is_b_host = 1;
del_timer(&musb->otg_timer);
break;
default:
--
2.17.1