common/cpt: redesign propagation of error
authorAnoob Joseph <anoobj@marvell.com>
Fri, 1 Mar 2019 18:42:27 +0000 (18:42 +0000)
committerAkhil Goyal <akhil.goyal@nxp.com>
Fri, 22 Mar 2019 14:54:24 +0000 (15:54 +0100)
commitf39928e6560648362858f0103e3b7bed18e89606
treec65cd4a47328cab35994e32a7185fc6a88d27e93
parenta03a7bfb90066bd02a941b318f533cba720620bc
common/cpt: redesign propagation of error

The check for prep_req is good enough to flag error. The return var
passed around is redundant. Fixing this. Also making the functions
return correct error values in case of various failures.

In addition, adding unlikely flag for all error checks.

Signed-off-by: Ankur Dwivedi <adwivedi@marvell.com>
Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Signed-off-by: Archana Muniganti <marchana@marvell.com>
drivers/common/cpt/cpt_request_mgr.h
drivers/common/cpt/cpt_ucode.h