Merge branch 'x86-bootmem-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[sfrench/cifs-2.6.git] / drivers / infiniband / hw / ehca / ehca_sqp.c
index 8c1213f8916a19bfdccab6f3dcaf08f14065c509..dba8f9f8b9964bcfe61a899b6a7c5e2500b807dc 100644 (file)
@@ -222,7 +222,7 @@ int ehca_process_mad(struct ib_device *ibdev, int mad_flags, u8 port_num,
 {
        int ret;
 
-       if (!port_num || port_num > ibdev->phys_port_cnt)
+       if (!port_num || port_num > ibdev->phys_port_cnt || !in_wc)
                return IB_MAD_RESULT_FAILURE;
 
        /* accept only pma request */