refactor to use gotos instead of explicit exit paths
Signed-off-by: Dave Jones <davej@redhat.com>
{
struct cpufreq_policy * policy = to_policy(kobj);
struct freq_attr * fattr = to_attr(attr);
{
struct cpufreq_policy * policy = to_policy(kobj);
struct freq_attr * fattr = to_attr(attr);
policy = cpufreq_cpu_get(policy->cpu);
if (!policy)
policy = cpufreq_cpu_get(policy->cpu);
if (!policy)
if (lock_policy_rwsem_read(policy->cpu) < 0)
if (lock_policy_rwsem_read(policy->cpu) < 0)
if (fattr->show)
ret = fattr->show(policy, buf);
if (fattr->show)
ret = fattr->show(policy, buf);
ret = -EIO;
unlock_policy_rwsem_read(policy->cpu);
ret = -EIO;
unlock_policy_rwsem_read(policy->cpu);