Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

hwrng: ks-sa - Fix runtime PM imbalance on error

pm_runtime_get_sync() increments the runtime PM usage counter even
the call returns an error code. Thus a pairing decrement is needed
on the error handling path to keep the counter balanced.

Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn>
Reviewed-by: Alexander Sverdlin <alexander.sverdlin@nokia.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

authored by

Dinghao Liu and committed by
Herbert Xu
95459261 b3a9e3b9

+1
+1
drivers/char/hw_random/ks-sa-rng.c
··· 244 244 ret = pm_runtime_get_sync(dev); 245 245 if (ret < 0) { 246 246 dev_err(dev, "Failed to enable SA power-domain\n"); 247 + pm_runtime_put_noidle(dev); 247 248 pm_runtime_disable(dev); 248 249 return ret; 249 250 }