Merge tag 'v5.13-rc6' into usb-next
[linux-2.6-microblaze.git] / drivers / usb / typec / ucsi / ucsi.c
index b433169..5ef5bd0 100644 (file)
@@ -1219,7 +1219,7 @@ static int ucsi_init(struct ucsi *ucsi)
                goto err_reset;
        }
 
-       /* Allocate the connectors. Released in ucsi_unregister_ppm() */
+       /* Allocate the connectors. Released in ucsi_unregister() */
        ucsi->connector = kcalloc(ucsi->cap.num_connectors + 1,
                                  sizeof(*ucsi->connector), GFP_KERNEL);
        if (!ucsi->connector) {
@@ -1253,6 +1253,7 @@ err_unregister:
        }
 
 err_reset:
+       memset(&ucsi->cap, 0, sizeof(ucsi->cap));
        ucsi_reset_ppm(ucsi);
 err:
        return ret;
@@ -1279,7 +1280,7 @@ void *ucsi_get_drvdata(struct ucsi *ucsi)
 EXPORT_SYMBOL_GPL(ucsi_get_drvdata);
 
 /**
- * ucsi_get_drvdata - Assign private driver data pointer
+ * ucsi_set_drvdata - Assign private driver data pointer
  * @ucsi: UCSI interface
  * @data: Private data pointer
  */