Skip to content

Commit 6a1ec89

Browse files
tmlindherbertx
authored andcommitted
crypto: omap-sham - initialize req only after omap_sham_hw_init()
Let's only initialize dd->req after omap_sham_hw_init() in case of errors. Looks like leaving dd->req initialized on omap_sham_hw_init() errors is is not causing issues though as we return on errors. So this patch can be applied as clean-up. Cc: Lokesh Vutla <[email protected]> Cc: Tero Kristo <[email protected]> Signed-off-by: Tony Lindgren <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
1 parent fe28140 commit 6a1ec89

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/crypto/omap-sham.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1093,12 +1093,12 @@ static int omap_sham_hash_one_req(struct crypto_engine *engine, void *areq)
10931093
dev_dbg(dd->dev, "hash-one: op: %u, total: %u, digcnt: %zd, final: %d",
10941094
ctx->op, ctx->total, ctx->digcnt, final);
10951095

1096-
dd->req = req;
1097-
10981096
err = omap_sham_hw_init(dd);
10991097
if (err)
11001098
return err;
11011099

1100+
dd->req = req;
1101+
11021102
if (ctx->digcnt)
11031103
dd->pdata->copy_hash(req, 0);
11041104

0 commit comments

Comments
 (0)