RDMA/nes: checking for NULL instead of IS_ERR
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 12 Jan 2016 09:27:43 +0000 (12:27 +0300)
committerDoug Ledford <dledford@redhat.com>
Tue, 19 Jan 2016 20:17:40 +0000 (15:17 -0500)
commitbc1251e6d9420fec4c6b328bcf9ea4e5bdecd30d
tree43006b154498e1ce612d2adb86b1348b7f87b027
parentfbbeb8632bf0b46ab44cfcedc4654cd7831b7161
RDMA/nes: checking for NULL instead of IS_ERR

nes_reg_phys_mr() returns ERR_PTRs on error.  It doesn't return NULL.

This bug has been there for a while, but we recently changed from
calling a function pointer to calling nes_reg_phys_mr() directly so now
Smatch is able to detect the bug.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/nes/nes_cm.c