lkml.org 
[lkml]   [2019]   [Dec]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] usb: musb: Remove unnecessary check of musb->hcd in musb_handle_intr_connect()
Date
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@gmail.com>
---
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
\
 
 \ /
  Last update: 2019-12-17 10:52    [W:0.032 / U:2.572 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site