diff options
author | Ralph Campbell <ralph.campbell@qlogic.com> | 2007-10-23 18:04:15 -0400 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2008-01-25 17:15:25 -0500 |
commit | 3828ff457a694f97f88f6978bea428199df0a690 (patch) | |
tree | 0ded699f96774f42b64828417d688cc88379db04 /drivers/infiniband/core | |
parent | 8d8293cfb38b042835eeded7c1d90f75ca243e87 (diff) |
IB/mad: Remove redundant NULL pointer check in ib_mad_recv_done_handler()
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>
Diffstat (limited to 'drivers/infiniband/core')
-rw-r--r-- | drivers/infiniband/core/mad.c | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/drivers/infiniband/core/mad.c b/drivers/infiniband/core/mad.c index 6f4287716ab1..f82900d30b9a 100644 --- a/drivers/infiniband/core/mad.c +++ b/drivers/infiniband/core/mad.c | |||
@@ -1931,15 +1931,6 @@ local: | |||
1931 | if (port_priv->device->process_mad) { | 1931 | if (port_priv->device->process_mad) { |
1932 | int ret; | 1932 | int ret; |
1933 | 1933 | ||
1934 | if (!response) { | ||
1935 | printk(KERN_ERR PFX "No memory for response MAD\n"); | ||
1936 | /* | ||
1937 | * Is it better to assume that | ||
1938 | * it wouldn't be processed ? | ||
1939 | */ | ||
1940 | goto out; | ||
1941 | } | ||
1942 | |||
1943 | ret = port_priv->device->process_mad(port_priv->device, 0, | 1934 | ret = port_priv->device->process_mad(port_priv->device, 0, |
1944 | port_priv->port_num, | 1935 | port_priv->port_num, |
1945 | wc, &recv->grh, | 1936 | wc, &recv->grh, |