aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/message/fusion/mptsas.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/message/fusion/mptsas.c b/drivers/message/fusion/mptsas.c
index f77b329f6923..78734e25edd5 100644
--- a/drivers/message/fusion/mptsas.c
+++ b/drivers/message/fusion/mptsas.c
@@ -1701,6 +1701,11 @@ mptsas_sas_expander_pg0(MPT_ADAPTER *ioc, struct mptsas_portinfo *port_info,
1701 if (error) 1701 if (error)
1702 goto out_free_consistent; 1702 goto out_free_consistent;
1703 1703
1704 if (!buffer->NumPhys) {
1705 error = -ENODEV;
1706 goto out_free_consistent;
1707 }
1708
1704 /* save config data */ 1709 /* save config data */
1705 port_info->num_phys = buffer->NumPhys; 1710 port_info->num_phys = buffer->NumPhys;
1706 port_info->phy_info = kcalloc(port_info->num_phys, 1711 port_info->phy_info = kcalloc(port_info->num_phys,