PM / devfreq: Add missing error code in devfreq_add_device()
[linux-2.6-microblaze.git] / drivers / devfreq / devfreq.c
index fe08c46..28f3e0b 100644 (file)
@@ -823,6 +823,7 @@ struct devfreq *devfreq_add_device(struct device *dev,
        if (devfreq->profile->timer < 0
                || devfreq->profile->timer >= DEVFREQ_TIMER_NUM) {
                mutex_unlock(&devfreq->lock);
+               err = -EINVAL;
                goto err_dev;
        }