projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3ad7de6
)
hpsa: check for null arguments to dev_printk
author
Don Brace
<
[email protected]
>
Wed, 4 Nov 2015 21:50:25 +0000
(15:50 -0600)
committer
Martin K. Petersen
<
[email protected]
>
Mon, 9 Nov 2015 17:34:19 +0000
(12:34 -0500)
Check for NULLs.
Reviewed-by: Tomas Henzl <
[email protected]
>
Reviewed-by: Manoj Kumar <
[email protected]
>
Signed-off-by: Don Brace <
[email protected]
>
Reviewed-by: Hannes Reinecke <
[email protected]
>
Signed-off-by: Martin K. Petersen <
[email protected]
>
drivers/scsi/hpsa.c
patch
|
blob
|
history
diff --git
a/drivers/scsi/hpsa.c
b/drivers/scsi/hpsa.c
index 5a99627368a392a0c36d028bf0150cff343ed36f..b64913f9d88062efd3b1799f0fd13dcbd95e47b6 100644
(file)
--- 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,