]> err.no Git - linux-2.6/commitdiff
IB/mad: Remove redundant NULL pointer check in ib_mad_recv_done_handler()
authorRalph Campbell <ralph.campbell@qlogic.com>
Tue, 23 Oct 2007 22:04:15 +0000 (15:04 -0700)
committerRoland Dreier <rolandd@cisco.com>
Fri, 25 Jan 2008 22:15:25 +0000 (14:15 -0800)
In ib_mad_recv_done_handler(), the response pointer is checked for
NULL after allocating it.  It is then checked again in the local
process_mad() path but there is no possibility of it changing in
between.

Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com>
Acked-by: Hal Rosenstock <hal@xsigo.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/core/mad.c

index 6f4287716ab1b63516e89197282925e30e86a279..f82900d30b9abdfd567c40ee45d0e038e9493b93 100644 (file)
@@ -1931,15 +1931,6 @@ local:
        if (port_priv->device->process_mad) {
                int ret;
 
-               if (!response) {
-                       printk(KERN_ERR PFX "No memory for response MAD\n");
-                       /*
-                        * Is it better to assume that
-                        * it wouldn't be processed ?
-                        */
-                       goto out;
-               }
-
                ret = port_priv->device->process_mad(port_priv->device, 0,
                                                     port_priv->port_num,
                                                     wc, &recv->grh,