From: Rafael J. Wysocki Date: Sat, 3 Aug 2013 23:19:41 +0000 (+0200) Subject: cpufreq: Avoid double kobject_put() for the same kobject in error code path X-Git-Tag: v3.12-rc1~178^2~4^2~1^2~15^2~12 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=10659ab7b50e963429f1a681882404ca37aa584c;p=pandora-kernel.git cpufreq: Avoid double kobject_put() for the same kobject in error code path The only case triggering a jump to the err_out_unregister label in __cpufreq_add_dev() is when cpufreq_add_dev_interface() fails. However, if cpufreq_add_dev_interface() fails, it calls kobject_put() for the policy kobject in its error code path and since that causes the kobject's refcount to become 0, the additional kobject_put() for the same kobject under err_out_unregister and the wait_for_completion() following it are pointless, so drop them. Signed-off-by: Rafael J. Wysocki Reviewed-by: Srivatsa S. Bhat Acked-by: Viresh Kumar --- Reading git-diff-tree failed