diff options
author | Pete Zaitcev <zaitcev@redhat.com> | 2006-04-28 20:45:49 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-06-21 15:04:09 -0700 |
commit | 41fea55e0382b7d59d694d8055b39aa69c793b1f (patch) | |
tree | 634dce47441863b0270f66de25a0995bb767b8dd | |
parent | 4489a5712b086621a6c3f669057d2996245cd3fb (diff) | |
download | talos-obmc-linux-41fea55e0382b7d59d694d8055b39aa69c793b1f.tar.gz talos-obmc-linux-41fea55e0382b7d59d694d8055b39aa69c793b1f.zip |
[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>
-rw-r--r-- | drivers/block/ub.c | 8 |
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) static int ub_bd_open(struct inode *inode, struct file *filp) { struct gendisk *disk = inode->i_bdev->bd_disk; - struct ub_lun *lun; - struct ub_dev *sc; + struct ub_lun *lun = disk->private_data; + struct ub_dev *sc = lun->udev; unsigned long flags; int rc; - if ((lun = disk->private_data) == NULL) - return -ENXIO; - sc = lun->udev; - spin_lock_irqsave(&ub_lock, flags); if (atomic_read(&sc->poison)) { spin_unlock_irqrestore(&ub_lock, flags); |