]> git.baikalelectronics.ru Git - kernel.git/commit
IB/mthca: Return proper error codes from mthca_fmr_alloc()
authorOlaf Kirch <olaf.kirch@oracle.com>
Tue, 5 Feb 2008 04:20:44 +0000 (20:20 -0800)
committerRoland Dreier <rolandd@cisco.com>
Tue, 5 Feb 2008 04:20:44 +0000 (20:20 -0800)
commita55384ab316d712c5c2826220a900337c2064db9
treea89ab43cc596415f80e434470595fcbb4f8e7544
parentaf232ad6e1d69ac2806076e96d0f0afe53a3b03d
IB/mthca: Return proper error codes from mthca_fmr_alloc()

If the allocation of the MTT or the mailbox failed, mthca_fmr_alloc()
would return 0 (success) no matter what. This leads to crashes a
little down the road, when we try to dereference eg mr->mtt, which was
really ERR_PTR(-Ewhatever).

Signed-off-by: Olaf Kirch <olaf.kirch@oracle.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/hw/mthca/mthca_mr.c