From: Wei Yongjun <weiyongjun1@huawei.com> To: MyungJoo Ham <myungjoo.ham@samsung.com>, Kyungmin Park <kyungmin.park@samsung.com>, Chanwoo Choi <cw00.choi@samsung.com> Cc: Wei Yongjun <weiyongjun1@huawei.com>, linux-pm@vger.kernel.org, kernel-janitors@vger.kernel.org, Hulk Robot <hulkci@huawei.com> Subject: [PATCH -next] PM / devfreq: Fix missing unlock on error in devfreq_add_device() Date: Tue, 14 Jul 2020 06:30:25 +0000 [thread overview] Message-ID: <20200714063025.118829-1-weiyongjun1@huawei.com> (raw) Add the missing unlock before return from function devfreq_add_device() in the error handling case. Fixes: d7c46505a7ad ("PM / devfreq: Add support delayed timer for polling mode") Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> --- drivers/devfreq/devfreq.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c index 5320c3b37f35..2b54a59bb281 100644 --- a/drivers/devfreq/devfreq.c +++ b/drivers/devfreq/devfreq.c @@ -788,6 +788,7 @@ struct devfreq *devfreq_add_device(struct device *dev, if (devfreq->profile->timer < 0 || devfreq->profile->timer >= DEVFREQ_TIMER_NUM) { + mutex_unlock(&devfreq->lock); goto err_out; }
WARNING: multiple messages have this Message-ID (diff)
From: Wei Yongjun <weiyongjun1@huawei.com> To: MyungJoo Ham <myungjoo.ham@samsung.com>, Kyungmin Park <kyungmin.park@samsung.com>, Chanwoo Choi <cw00.choi@samsung.com> Cc: Wei Yongjun <weiyongjun1@huawei.com>, <linux-pm@vger.kernel.org>, <kernel-janitors@vger.kernel.org>, Hulk Robot <hulkci@huawei.com> Subject: [PATCH -next] PM / devfreq: Fix missing unlock on error in devfreq_add_device() Date: Tue, 14 Jul 2020 06:30:25 +0000 [thread overview] Message-ID: <20200714063025.118829-1-weiyongjun1@huawei.com> (raw) Add the missing unlock before return from function devfreq_add_device() in the error handling case. Fixes: d7c46505a7ad ("PM / devfreq: Add support delayed timer for polling mode") Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> --- drivers/devfreq/devfreq.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c index 5320c3b37f35..2b54a59bb281 100644 --- a/drivers/devfreq/devfreq.c +++ b/drivers/devfreq/devfreq.c @@ -788,6 +788,7 @@ struct devfreq *devfreq_add_device(struct device *dev, if (devfreq->profile->timer < 0 || devfreq->profile->timer >= DEVFREQ_TIMER_NUM) { + mutex_unlock(&devfreq->lock); goto err_out; }
next reply other threads:[~2020-07-14 6:30 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-07-14 6:30 Wei Yongjun [this message] 2020-07-14 6:30 ` [PATCH -next] PM / devfreq: Fix missing unlock on error in devfreq_add_device() Wei Yongjun 2020-07-14 9:37 ` Dan Carpenter 2020-07-14 9:37 ` Dan Carpenter 2020-07-14 10:59 ` Dan Carpenter 2020-07-14 10:59 ` Dan Carpenter
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20200714063025.118829-1-weiyongjun1@huawei.com \ --to=weiyongjun1@huawei.com \ --cc=cw00.choi@samsung.com \ --cc=hulkci@huawei.com \ --cc=kernel-janitors@vger.kernel.org \ --cc=kyungmin.park@samsung.com \ --cc=linux-pm@vger.kernel.org \ --cc=myungjoo.ham@samsung.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.