iwmc3200wifi: Return proper error for iwm_if_alloc
authorAxel Lin <axel.lin@gmail.com>
Mon, 10 Jan 2011 02:26:00 +0000 (10:26 +0800)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 13 Jan 2011 20:46:44 +0000 (15:46 -0500)
In the case of alloc_netdev_mq failure and kmalloc failure,
current implementation returns ERR_PTR(0).

As a result, the caller of iwm_if_alloc does not catch the error by IS_ERR
macro. Fix it by setting proper error code for ret variable in the failure
cases.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

No differences found