linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [patch] PM / devfreq: event: testing the wrong variable
@ 2015-02-10 10:35 Dan Carpenter
  2015-02-10 10:59 ` Chanwoo Choi
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2015-02-10 10:35 UTC (permalink / raw)
  To: linux-arm-kernel

There is a typo here so we test "edev" but we intended to test
"edev[i]".

Fixes: f262f28c1470 ('PM / devfreq: event: Add devfreq_event class')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/devfreq/event/exynos-ppmu.c b/drivers/devfreq/event/exynos-ppmu.c
index 135be0a..ad83473 100644
--- a/drivers/devfreq/event/exynos-ppmu.c
+++ b/drivers/devfreq/event/exynos-ppmu.c
@@ -327,8 +327,8 @@ static int exynos_ppmu_probe(struct platform_device *pdev)
 
 	for (i = 0; i < info->num_events; i++) {
 		edev[i] = devm_devfreq_event_add_edev(&pdev->dev, &desc[i]);
-		if (IS_ERR(edev)) {
-			ret = PTR_ERR(edev);
+		if (IS_ERR(edev[i])) {
+			ret = PTR_ERR(edev[i]);
 			dev_err(&pdev->dev,
 				"failed to add devfreq-event device\n");
 			goto err;

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [patch] PM / devfreq: event: testing the wrong variable
  2015-02-10 10:35 [patch] PM / devfreq: event: testing the wrong variable Dan Carpenter
@ 2015-02-10 10:59 ` Chanwoo Choi
  0 siblings, 0 replies; 2+ messages in thread
From: Chanwoo Choi @ 2015-02-10 10:59 UTC (permalink / raw)
  To: linux-arm-kernel

On 02/10/2015 07:35 PM, Dan Carpenter wrote:
> There is a typo here so we test "edev" but we intended to test
> "edev[i]".
> 
> Fixes: f262f28c1470 ('PM / devfreq: event: Add devfreq_event class')
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> 
> diff --git a/drivers/devfreq/event/exynos-ppmu.c b/drivers/devfreq/event/exynos-ppmu.c
> index 135be0a..ad83473 100644
> --- a/drivers/devfreq/event/exynos-ppmu.c
> +++ b/drivers/devfreq/event/exynos-ppmu.c
> @@ -327,8 +327,8 @@ static int exynos_ppmu_probe(struct platform_device *pdev)
>  
>  	for (i = 0; i < info->num_events; i++) {
>  		edev[i] = devm_devfreq_event_add_edev(&pdev->dev, &desc[i]);
> -		if (IS_ERR(edev)) {
> -			ret = PTR_ERR(edev);
> +		if (IS_ERR(edev[i])) {
> +			ret = PTR_ERR(edev[i]);
>  			dev_err(&pdev->dev,
>  				"failed to add devfreq-event device\n");
>  			goto err;
> 

Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>

But,
This patch has not yet merged to linux.git (http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git).
After releasing Linux 3.20-rc1, this patch will be handled.

Thanks,
Chanwoo Choi

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-02-10 10:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-10 10:35 [patch] PM / devfreq: event: testing the wrong variable Dan Carpenter
2015-02-10 10:59 ` Chanwoo Choi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).