usnic: correctly check failed allocation
authorInsu Yun <wuninsu@gmail.com>
Thu, 15 Oct 2015 21:15:15 +0000 (21:15 +0000)
committerDoug Ledford <dledford@redhat.com>
Wed, 21 Oct 2015 20:41:19 +0000 (16:41 -0400)
commit2c79dad8953626b8b808a353bc661c9f321a64c0
tree814f22590750e094867201bfc9a9849c5fdf0c30
parentfc81a06965396150a395b1fe29f1bd13d4825ad6
usnic: correctly check failed allocation

Since ib_alloc_device returns allocated memory address, not error,
it should be checked as IS_NULL, not IS_ERR_OR_NULL.

Signed-off-by: Insu Yun <wuninsu@gmail.com>
Reviewed-by: Dave Goodell <dgoodell@cisco.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/usnic/usnic_ib_main.c
This page took 0.028827 seconds and 5 git commands to generate.