Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 299239
b: refs/heads/master
c: 919f797
h: refs/heads/master
i:
  299237: bf4d2e4
  299235: 33a1e78
  299231: e2a6d69
v: v3
  • Loading branch information
Martin K. Petersen authored and Linus Torvalds committed Apr 15, 2012
1 parent 26f99ad commit 71e299f
Show file tree
Hide file tree
Showing 3 changed files with 5 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: bfecc60d8f6715ec6b38aa29c4f5a3570415dae0
refs/heads/master: 919f797a4c9c22ff5ec059744dba364dc600ece2
2 changes: 1 addition & 1 deletion trunk/drivers/scsi/scsi_error.c
Original file line number Diff line number Diff line change
Expand Up @@ -835,7 +835,7 @@ static int scsi_send_eh_cmnd(struct scsi_cmnd *scmd, unsigned char *cmnd,

scsi_eh_restore_cmnd(scmd, &ses);

if (sdrv->eh_action)
if (sdrv && sdrv->eh_action)
rtn = sdrv->eh_action(scmd, cmnd, cmnd_size, rtn);

return rtn;
Expand Down
3 changes: 3 additions & 0 deletions trunk/include/scsi/scsi_cmnd.h
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,9 @@ struct scsi_cmnd {

static inline struct scsi_driver *scsi_cmd_to_driver(struct scsi_cmnd *cmd)
{
if (!cmd->request->rq_disk)
return NULL;

return *(struct scsi_driver **)cmd->request->rq_disk->private_data;
}

Expand Down

0 comments on commit 71e299f

Please sign in to comment.