[RAMEN9610-19639][COMMON] usb: check cdev in retry configuration
authorKisang Lee <kisang80.lee@samsung.com>
Thu, 23 May 2019 10:14:37 +0000 (19:14 +0900)
committerKim Gunho <gunho.kim@samsung.com>
Mon, 9 Sep 2019 11:10:15 +0000 (20:10 +0900)
Change-Id: I125d4c004c84b33c41c842c49032eeef3b157d0f
Signed-off-by: Kisang Lee <kisang80.lee@samsung.com>
drivers/usb/dwc3/otg.c

index b5f38d0ec96b2b5ad4ea1cad7d567310cfe5a25a..c3e7ca19787fc7b839310410f8d6b66ba62c393a 100755 (executable)
@@ -330,13 +330,19 @@ static void retry_configuration(unsigned long data)
 
        pr_info("%s: +++\n", __func__);
 
+       if (cdev == NULL) {
+               pr_err("Stop retry configuration(cdev is NULL)\n");
+               return ;
+       }
+
        if (!cdev->config) {
 
                if (dwc->dr_mode == USB_DR_MODE_HOST)
                        return;
 
                if (dwc->retry_cnt > MAX_RETRY_CNT) {
-                       pr_err("%s: Re-try 5 times, But usb enumeration fail\n");
+                       pr_err("%s: Re-try 5 times, But usb enumeration fail\n",
+                                       __func__);
                        return;
                }