RDMA/amso1100: Add check if cache memory was allocated before freeing it
[deliverable/linux.git] / drivers / infiniband / hw / amso1100 / c2_intr.c
index 8951db4ae29d42ad2b12d4281c67c911748c2f78..3a17d9b36dbac2b947d7d09318878f00cc2e0403 100644 (file)
@@ -169,7 +169,8 @@ static void handle_vq(struct c2_dev *c2dev, u32 mq_index)
                 * We should never get here, as the adapter should
                 * never send us a reply that we're not expecting.
                 */
-               vq_repbuf_free(c2dev, host_msg);
+               if (reply_msg != NULL)
+                       vq_repbuf_free(c2dev, host_msg);
                pr_debug("handle_vq: UNEXPECTEDLY got NULL req\n");
                return;
        }
This page took 0.024297 seconds and 5 git commands to generate.