mlx4: corretly check failed allocation
authorInsu Yun <wuninsu@gmail.com>
Thu, 15 Oct 2015 16:24:09 +0000 (12:24 -0400)
committerDavid S. Miller <davem@davemloft.net>
Fri, 16 Oct 2015 06:31:38 +0000 (23:31 -0700)
commit175f8d6746aa4b1dac5ccf576bcbc5488ff21a36
tree69a80424c96f25683797ffdc17cb2e58addaf547
parente87eb4051efe76b35d0a297db772f5964a001544
mlx4: corretly check failed allocation

When allocation fails, mlx4_alloc_cmd_mailbox returns -ENOMEM.
Since there is no case that mlx4_alloc_cmd_mailbox returns NULL,
it needs to be checked by IS_ERR, not IS_ERR_OR_NULL

Signed-off-by: Insu Yun <wuninsu@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx4/mr.c