Commit 430df033 authored by James Bottomley's avatar James Bottomley

cciss scsi: fix use before check of possible null pointer

From: Joilnen Leite <knl_joi@yahoo.com.br>
parent 1fb666d2
......@@ -896,13 +896,14 @@ cciss_scsi_do_inquiry(ctlr_info_t *c, unsigned char *scsi3addr,
spin_lock_irqsave(CCISS_LOCK(c->ctlr), flags);
cp = scsi_cmd_alloc(c);
spin_unlock_irqrestore(CCISS_LOCK(c->ctlr), flags);
ei = cp->err_info;
if (cp == NULL) { /* trouble... */
printk("cmd_alloc returned NULL!\n");
return -1;
}
ei = cp->err_info;
cdb[0] = CISS_INQUIRY;
cdb[1] = 0;
cdb[2] = 0;
......
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