msm_rng: fix issue with unbalanced clk_put

This patch fixes the following coccicheck errors:

msm_rng.c:335:2-8: ERROR: missing clk_put;
clk_get on line 282 and execution via conditional on line 333
msm_rng.c:335:2-8: ERROR: missing clk_put;
clk_get on line 285 and execution via conditional on line 333

Bug: 35898203
Change-Id: Id6e0854ec11f95fe2bf7f887876535e2d8e74d22
Signed-off-by: David Lin <dtwlin@google.com>
This commit is contained in:
David Lin 2017-03-01 20:15:37 -08:00 committed by Timi
parent 07eeabe655
commit 985ceb51d2

View file

@ -332,7 +332,8 @@ static int msm_rng_probe(struct platform_device *pdev)
msm_rng_class = class_create(THIS_MODULE, "msm-rng");
if (IS_ERR(msm_rng_class)) {
pr_err("class_create failed\n");
return PTR_ERR(msm_rng_class);
error = PTR_ERR(msm_rng_class);
goto unregister_chrdev;
}
dev = device_create(msm_rng_class, NULL, MKDEV(QRNG_IOC_MAGIC, 0),