Skip to content

Commit

Permalink
[PATCH] USB: clean out an unnecessary NULL check from ub
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Pete Zaitcev authored and Greg Kroah-Hartman committed Jun 21, 2006
1 parent 4489a57 commit 41fea55
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions drivers/block/ub.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 41fea55

Please sign in to comment.