lkml.org 
[lkml]   [2016]   [Aug]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 3/4] KVM-S390: Less function calls in kvm_s390_import_bp_data() after error detection
From
Date
>> @@ -273,10 +273,12 @@ int kvm_s390_import_bp_data(struct kvm_vcpu *vcpu,
>> vcpu->arch.guestdbg.nr_hw_wp = nr_wp;
>> vcpu->arch.guestdbg.hw_wp_info = wp_info;
>> return 0;
>> -error:
>> - kfree(bp_data);
>> - kfree(wp_info);
>> +free_bp_info:
>> kfree(bp_info);
>> +free_wp_info:
>> + kfree(wp_info);
>> +free_bp_data:
>> + kfree(bp_data);
>> return ret;
>> }
>>
>
> This replaces a perfectly fine fallthrough

The usage of a single goto label like "error" seems to be convenient.
But how do these habits fit to the current Linux coding style convention?


> with some horrible labels.

Do they explain better which processing steps should be performed
for an efficient exception handling in this function implementation?

Regards,
Markus

\
 
 \ /
  Last update: 2016-09-17 09:57    [W:0.090 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site