提交 3828ff45 编写于 作者: R Ralph Campbell 提交者: Roland Dreier

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: NRalph Campbell <ralph.campbell@qlogic.com>
Acked-by: NHal Rosenstock <hal@xsigo.com>
Signed-off-by: NRoland Dreier <rolandd@cisco.com>
上级 8d8293cf
......@@ -1931,15 +1931,6 @@ static void ib_mad_recv_done_handler(struct ib_mad_port_private *port_priv,
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,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册