]> git.baikalelectronics.ru Git - kernel.git/commit
IB/IPoIB: Fix error code in ipoib_add_port()
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 13 Jul 2017 07:45:48 +0000 (10:45 +0300)
committerDoug Ledford <dledford@redhat.com>
Thu, 20 Jul 2017 15:20:49 +0000 (11:20 -0400)
commit0e4991a56a702c88954e4caf85bacea30da69937
treedd3479ff4bcc74152fb5ade330fa4e062467fe53
parentc2b9c0949ebf82f8fe22cada58a4b8281fbdc62b
IB/IPoIB: Fix error code in ipoib_add_port()

We accidentally don't see the error code on some of these error paths.
It means we return ERR_PTR(0) which is NULL and it results in a NULL
dereference in the caller.

This bug dates to pre-git days.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/ulp/ipoib/ipoib_main.c