PM / devfreq: event: testing the wrong variable
[linux-drm-fsl-dcu.git] / drivers / devfreq / event / exynos-ppmu.c
index 135be0aada9d41db1f0af93d66c645e06715d316..ad8347385f53ba38ab789613c5ce28830c2a9eff 100644 (file)
@@ -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;