aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/ub.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/block/ub.c b/drivers/block/ub.c
index 048d71d244d7..12fb816db7b0 100644
--- a/drivers/block/ub.c
+++ b/drivers/block/ub.c
@@ -1579,7 +1579,7 @@ static void ub_reset_task(struct work_struct *work)
1579 struct ub_dev *sc = container_of(work, struct ub_dev, reset_work); 1579 struct ub_dev *sc = container_of(work, struct ub_dev, reset_work);
1580 unsigned long flags; 1580 unsigned long flags;
1581 struct ub_lun *lun; 1581 struct ub_lun *lun;
1582 int lkr, rc; 1582 int rc;
1583 1583
1584 if (!sc->reset) { 1584 if (!sc->reset) {
1585 printk(KERN_WARNING "%s: Running reset unrequested\n", 1585 printk(KERN_WARNING "%s: Running reset unrequested\n",
@@ -1597,10 +1597,11 @@ static void ub_reset_task(struct work_struct *work)
1597 } else if (sc->dev->actconfig->desc.bNumInterfaces != 1) { 1597 } else if (sc->dev->actconfig->desc.bNumInterfaces != 1) {
1598 ; 1598 ;
1599 } else { 1599 } else {
1600 if ((lkr = usb_lock_device_for_reset(sc->dev, sc->intf)) < 0) { 1600 rc = usb_lock_device_for_reset(sc->dev, sc->intf);
1601 if (rc < 0) {
1601 printk(KERN_NOTICE 1602 printk(KERN_NOTICE
1602 "%s: usb_lock_device_for_reset failed (%d)\n", 1603 "%s: usb_lock_device_for_reset failed (%d)\n",
1603 sc->name, lkr); 1604 sc->name, rc);
1604 } else { 1605 } else {
1605 rc = usb_reset_device(sc->dev); 1606 rc = usb_reset_device(sc->dev);
1606 if (rc < 0) { 1607 if (rc < 0) {
@@ -1608,9 +1609,7 @@ static void ub_reset_task(struct work_struct *work)
1608 "usb_lock_device_for_reset failed (%d)\n", 1609 "usb_lock_device_for_reset failed (%d)\n",
1609 sc->name, rc); 1610 sc->name, rc);
1610 } 1611 }
1611 1612 usb_unlock_device(sc->dev);
1612 if (lkr)
1613 usb_unlock_device(sc->dev);
1614 } 1613 }
1615 } 1614 }
1616 1615