aboutsummaryrefslogtreecommitdiff
path: root/drivers/message/fusion/mptsas.c
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2008-03-13 15:26:33 +1100
committerPaul Mackerras <paulus@samba.org>2008-03-13 15:26:33 +1100
commitbed04a4413376265746053be2a9cfbfc80c98ec9 (patch)
tree8f582294a655f70496cd08aedeb86de31dbad140 /drivers/message/fusion/mptsas.c
parente37c772e36a7943b2e0bd8f48312e78474c0df15 (diff)
parentc463be3520065ef8c05e3cbdf946c69604e91ceb (diff)
Merge branch 'linux-2.6'
Diffstat (limited to 'drivers/message/fusion/mptsas.c')
-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 f77b329f692..78734e25edd 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,
if (error)
goto out_free_consistent;
+ if (!buffer->NumPhys) {
+ error = -ENODEV;
+ goto out_free_consistent;
+ }
+
/* save config data */
port_info->num_phys = buffer->NumPhys;
port_info->phy_info = kcalloc(port_info->num_phys,