Commit b73335fe authored by Douglas Gilbert's avatar Douglas Gilbert Committed by Linus Torvalds

[PATCH] st driver in lk 2.5.7 and beyond

Fix oops in st_open..
parent 745f4617
...@@ -924,8 +924,8 @@ static int st_open(struct inode *inode, struct file *filp) ...@@ -924,8 +924,8 @@ static int st_open(struct inode *inode, struct file *filp)
int dev = TAPE_NR(inode->i_rdev); int dev = TAPE_NR(inode->i_rdev);
write_lock(&st_dev_arr_lock); write_lock(&st_dev_arr_lock);
STp = scsi_tapes[dev]; if (dev >= st_template.dev_max || scsi_tapes == NULL ||
if (dev >= st_template.dev_max || STp == NULL) { ((STp = scsi_tapes[dev]) == NULL)) {
write_unlock(&st_dev_arr_lock); write_unlock(&st_dev_arr_lock);
return (-ENXIO); return (-ENXIO);
} }
......
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