OSDN Git Service

IB/hfi1: Missing return value in error path for user sdma
authorMichael J. Ruhl <michael.j.ruhl@intel.com>
Mon, 10 Sep 2018 16:39:28 +0000 (09:39 -0700)
committerJason Gunthorpe <jgg@mellanox.com>
Tue, 11 Sep 2018 16:05:17 +0000 (10:05 -0600)
commit2bf4b33f83dfe521c4c7c407b6b150aeec04d69c
treee52bdd9e8772315c6b4cd5fdc5b6f806382f9f68
parent3ca633f1ff7b1c1e8653181352485889b5636a12
IB/hfi1: Missing return value in error path for user sdma

If the set_txreq_header_agh() function returns an error, the exit path
is chosen.

In this path, the code fails to set the return value.  This will cause
the caller to not realize an error has occurred.

Set the return value correctly in the error path.

Signed-off-by: Michael J. Ruhl <michael.j.ruhl@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/hfi1/user_sdma.c