aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/ub.c
diff options
context:
space:
mode:
authorPete Zaitcev <zaitcev@redhat.com>2006-04-28 23:45:49 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2006-06-21 18:04:09 -0400
commit41fea55e0382b7d59d694d8055b39aa69c793b1f (patch)
tree634dce47441863b0270f66de25a0995bb767b8dd /drivers/block/ub.c
parent4489a5712b086621a6c3f669057d2996245cd3fb (diff)
[PATCH] USB: clean out an unnecessary NULL check from ub
Remove the check for NULL which makes no sense. Suggested by Al. Signed-off-by: Pete Zaitcev <zaitcev@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/block/ub.c')
-rw-r--r--drivers/block/ub.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/block/ub.c b/drivers/block/ub.c
index c688c25992e4..8eb44a55b9b8 100644
--- a/drivers/block/ub.c
+++ b/drivers/block/ub.c
@@ -1651,15 +1651,11 @@ static void ub_revalidate(struct ub_dev *sc, struct ub_lun *lun)
1651static int ub_bd_open(struct inode *inode, struct file *filp) 1651static int ub_bd_open(struct inode *inode, struct file *filp)
1652{ 1652{
1653 struct gendisk *disk = inode->i_bdev->bd_disk; 1653 struct gendisk *disk = inode->i_bdev->bd_disk;
1654 struct ub_lun *lun; 1654 struct ub_lun *lun = disk->private_data;
1655 struct ub_dev *sc; 1655 struct ub_dev *sc = lun->udev;
1656 unsigned long flags; 1656 unsigned long flags;
1657 int rc; 1657 int rc;
1658 1658
1659 if ((lun = disk->private_data) == NULL)
1660 return -ENXIO;
1661 sc = lun->udev;
1662
1663 spin_lock_irqsave(&ub_lock, flags); 1659 spin_lock_irqsave(&ub_lock, flags);
1664 if (atomic_read(&sc->poison)) { 1660 if (atomic_read(&sc->poison)) {
1665 spin_unlock_irqrestore(&ub_lock, flags); 1661 spin_unlock_irqrestore(&ub_lock, flags);