OSDN Git Service

iw_cxgb4: Fixes static checker warning in c4iw_rdev_open()
authorHariprasad S <hariprasad@chelsio.com>
Tue, 12 Jan 2016 11:03:21 +0000 (16:33 +0530)
committerDoug Ledford <dledford@redhat.com>
Tue, 19 Jan 2016 20:17:40 +0000 (15:17 -0500)
commit82b1df1b083ff1b1c45fcdf5a844351cdca03ed8
tree16ef906b5a30522d7dda241351e99e9a56d75d81
parenta7d0e959fab832d0614d0e144cb01cbb87d36258
iw_cxgb4: Fixes static checker warning in c4iw_rdev_open()

Commit c5dfb000b904 ("iw_cxgb4: Pass qid range to user space driver")
from Dec 11, 2015, leads to the following static checker warning:

drivers/infiniband/hw/cxgb4/device.c:857 c4iw_rdev_open()
        warn: variable dereferenced before check 'rdev->status_page'

Also we weren't deallocating ocqp pool in error path when failed to
allocate status page. Fixing it too.

Fixes: c5dfb000b904 ("iw_cxgb4: Pass qid range to user space driver")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/cxgb4/device.c