Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 223164
b: refs/heads/master
c: c7a841f
h: refs/heads/master
v: v3
  • Loading branch information
James Smart authored and James Bottomley committed Dec 9, 2010
1 parent bbb35b6 commit d0c8113
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 057f02a38e67a944a2d0b89bb0111efb9dbe6e6e
refs/heads/master: c7a841f3aca469187db76842676951a672fd27d1
8 changes: 8 additions & 0 deletions trunk/block/bsg.c
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,14 @@ bsg_map_hdr(struct bsg_device *bd, struct sg_io_v4 *hdr, fmode_t has_write_perm,
int ret, rw;
unsigned int dxfer_len;
void *dxferp = NULL;
struct bsg_class_device *bcd = &q->bsg_dev;

/* if the LLD has been removed then the bsg_unregister_queue will
* eventually be called and the class_dev was freed, so we can no
* longer use this request_queue. Return no such address.
*/
if (!bcd->class_dev)
return ERR_PTR(-ENXIO);

dprintk("map hdr %llx/%u %llx/%u\n", (unsigned long long) hdr->dout_xferp,
hdr->dout_xfer_len, (unsigned long long) hdr->din_xferp,
Expand Down

0 comments on commit d0c8113

Please sign in to comment.