summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/hpsa.c
diff options
context:
space:
mode:
authorDon Brace <don.brace@pmcs.com>2015-11-04 15:50:25 -0600
committerMartin K. Petersen <martin.petersen@oracle.com>2015-11-09 12:34:19 -0500
commit9975ec9dbeb1775d29faaae50b31e2c19f740bf8 (patch)
treeca88d77875b16e8507fb1fd1adb3563392e77c61 /drivers/scsi/hpsa.c
parent3ad7de6b7d031165e8b2c0775986128de17c5a63 (diff)
downloadop-kernel-dev-9975ec9dbeb1775d29faaae50b31e2c19f740bf8.zip
op-kernel-dev-9975ec9dbeb1775d29faaae50b31e2c19f740bf8.tar.gz
hpsa: check for null arguments to dev_printk
Check for NULLs. Reviewed-by: Tomas Henzl <thenzl@redhat.com> Reviewed-by: Manoj Kumar <manoj@linux.vnet.ibm.com> Signed-off-by: Don Brace <don.brace@pmcs.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/hpsa.c')
-rw-r--r--drivers/scsi/hpsa.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
index 5a996273..b64913f 100644
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
@@ -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,
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,
"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,
OpenPOWER on IntegriCloud