diff
+static void cleanup_disable_show(struct usb_hub *hub, struct usb_interface *intf,
+                                 struct kernfs_node *kn, struct usb_device *hdev)
+{
+	if (hdev)
+		usb_unlock_device(hdev);
+	if (kn)
+		sysfs_unbreak_active_protection(kn);
+	if (intf)
+		usb_autopm_put_interface(intf);
+	if (hub)
+		hub_put(hub);
+}
+
 static ssize_t disable_show(struct device *dev,
 			      struct device_attribute *attr, char *buf)
 {
     // ... (existing code) ...
     if (rc < 0)
-		goto out_hub_get;
+		goto out;
     // ... (existing code) ...
- out_hdev_lock:
-	usb_unlock_device(hdev);
+ out:
+	cleanup_disable_show(hub, intf, kn, hdev);
+	return rc;
 }
