]> pilppa.com Git - linux-2.6-omap-h63xx.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)
commit2c78853472a36c7cf51a84a34edc370e21c93ce4
treea89ab43cc596415f80e434470595fcbb4f8e7544
parentf33afc26dc03e6e0513e2e300f2aa0ad5463c2d2
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