Skip to content

Commit

Permalink
crypto: sa2ul - Fix pm_runtime enable in sa_ul_probe()
Browse files Browse the repository at this point in the history
[ Upstream commit 5c85523 ]

The pm_runtime APIs added first in commit 7694b6c ("crypto: sa2ul -
Add crypto driver") are not unwound properly and was fixed up partially
in commit 13343ba ("crypto: sa2ul - Fix PM reference leak in
sa_ul_probe()"). This fixed up the pm_runtime usage count but not the
state. Fix this properly.

Fixes: 13343ba ("crypto: sa2ul - Fix PM reference leak in sa_ul_probe()")
Signed-off-by: Suman Anna <s-anna@ti.com>
Reviewed-by: Tero Kristo <kristo@kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
sumananna authored and gregkh committed Jul 14, 2021
1 parent b595f99 commit dc0dae2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/crypto/sa2ul.c
Original file line number Diff line number Diff line change
Expand Up @@ -2411,6 +2411,7 @@ static int sa_ul_probe(struct platform_device *pdev)
if (ret < 0) {
dev_err(&pdev->dev, "%s: failed to get sync: %d\n", __func__,
ret);
pm_runtime_disable(dev);
return ret;
}

Expand Down

0 comments on commit dc0dae2

Please sign in to comment.