[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20191217095023.6878-1-baijiaju1990@gmail.com>
Date: Tue, 17 Dec 2019 17:50:23 +0800
From: Jia-Ju Bai <baijiaju1990@...il.com>
To: b-liu@...com, gregkh@...uxfoundation.org
Cc: linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
Jia-Ju Bai <baijiaju1990@...il.com>
Subject: [PATCH] usb: musb: Remove unnecessary check of musb->hcd in musb_handle_intr_connect()
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@...il.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
Powered by blists - more mailing lists