mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 11:46:19 +00:00
ERR_PTR() dereference in net/rds/iw.c
rdma_create_id() returns ERR_PTR() not null. Found by smatch (http://repo.or.cz/w/smatch.git). Compile tested. regards, dan carpenter Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Andy Grover <andy.grover@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
05a178ecdc
commit
5d57eeb52a
1 changed files with 2 additions and 2 deletions
|
@ -233,8 +233,8 @@ static int rds_iw_laddr_check(__be32 addr)
|
|||
* IB and iWARP capable NICs.
|
||||
*/
|
||||
cm_id = rdma_create_id(NULL, NULL, RDMA_PS_TCP);
|
||||
if (!cm_id)
|
||||
return -EADDRNOTAVAIL;
|
||||
if (IS_ERR(cm_id))
|
||||
return PTR_ERR(cm_id);
|
||||
|
||||
memset(&sin, 0, sizeof(sin));
|
||||
sin.sin_family = AF_INET;
|
||||
|
|
Loading…
Reference in a new issue