Commit 41fea55e authored by Pete Zaitcev's avatar Pete Zaitcev Committed by Greg Kroah-Hartman

[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: default avatarPete Zaitcev <zaitcev@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 4489a571
...@@ -1651,15 +1651,11 @@ static void ub_revalidate(struct ub_dev *sc, struct ub_lun *lun) ...@@ -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) static int ub_bd_open(struct inode *inode, struct file *filp)
{ {
struct gendisk *disk = inode->i_bdev->bd_disk; struct gendisk *disk = inode->i_bdev->bd_disk;
struct ub_lun *lun; struct ub_lun *lun = disk->private_data;
struct ub_dev *sc; struct ub_dev *sc = lun->udev;
unsigned long flags; unsigned long flags;
int rc; int rc;
if ((lun = disk->private_data) == NULL)
return -ENXIO;
sc = lun->udev;
spin_lock_irqsave(&ub_lock, flags); spin_lock_irqsave(&ub_lock, flags);
if (atomic_read(&sc->poison)) { if (atomic_read(&sc->poison)) {
spin_unlock_irqrestore(&ub_lock, flags); spin_unlock_irqrestore(&ub_lock, flags);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment