Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 100288
b: refs/heads/master
c: 04f4ac9
h: refs/heads/master
v: v3
  • Loading branch information
Jonathan Corbet committed Jun 20, 2008
1 parent 4c3e5c4 commit d4f20e2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 16750c2f32e3fd879fce787a13900f11633ef9af
refs/heads/master: 04f4ac9d1bb8a9103609ce8e927f8e98826ce339
7 changes: 6 additions & 1 deletion trunk/drivers/ide/ide-tape.c
Original file line number Diff line number Diff line change
Expand Up @@ -2421,9 +2421,12 @@ static int idetape_chrdev_open(struct inode *inode, struct file *filp)
if (i >= MAX_HWIFS * MAX_DRIVES)
return -ENXIO;

lock_kernel();
tape = ide_tape_chrdev_get(i);
if (!tape)
if (!tape) {
unlock_kernel();
return -ENXIO;
}

debug_log(DBG_CHRDEV, "Enter %s\n", __func__);

Expand Down Expand Up @@ -2482,10 +2485,12 @@ static int idetape_chrdev_open(struct inode *inode, struct file *filp)
}
}
}
unlock_kernel();
return 0;

out_put_tape:
ide_tape_put(tape);
unlock_kernel();
return retval;
}

Expand Down

0 comments on commit d4f20e2

Please sign in to comment.