Commit 9975ec9d authored by Don Brace's avatar Don Brace Committed by Martin K. Petersen

hpsa: check for null arguments to dev_printk

Check for NULLs.
Reviewed-by: default avatarTomas Henzl <thenzl@redhat.com>
Reviewed-by: default avatarManoj Kumar <manoj@linux.vnet.ibm.com>
Signed-off-by: default avatarDon Brace <don.brace@pmcs.com>
Reviewed-by: default avatarHannes Reinecke <hare@suse.de>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 3ad7de6b
...@@ -1138,6 +1138,9 @@ static int hpsa_find_target_lun(struct ctlr_info *h, ...@@ -1138,6 +1138,9 @@ static int hpsa_find_target_lun(struct ctlr_info *h,
static inline void hpsa_show_dev_msg(const char *level, struct ctlr_info *h, static inline void hpsa_show_dev_msg(const char *level, struct ctlr_info *h,
struct hpsa_scsi_dev_t *dev, char *description) struct hpsa_scsi_dev_t *dev, char *description)
{ {
if (h == NULL || h->pdev == NULL || h->scsi_host == NULL)
return;
dev_printk(level, &h->pdev->dev, dev_printk(level, &h->pdev->dev,
"scsi %d:%d:%d:%d: %s %s %.8s %.16s RAID-%s SSDSmartPathCap%c En%c Exp=%d\n", "scsi %d:%d:%d:%d: %s %s %.8s %.16s RAID-%s SSDSmartPathCap%c En%c Exp=%d\n",
h->scsi_host->host_no, dev->bus, dev->target, dev->lun, h->scsi_host->host_no, dev->bus, dev->target, dev->lun,
......
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