Re: [PATCH 04/18] staging: gasket: device registration error and unregister fixups

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>>  fail1:
>>       class_destroy(internal->class);
>>
>> +fail0:
>
> GW-BASIC sytle label names are an anti-pattern.  It's better to name the
> labels after what they do, just like function names describes what the
> function does.  Here it would be "goto clear_desc;" or something.  It
> doesn't have to be perfect but so long as you *try* to name it something
> useful that's better than not trying.
>
>> +     mutex_lock(&g_mutex);
>>       g_descs[desc_idx].driver_desc = NULL;
>> +     mutex_unlock(&g_mutex);
>>       return ret;
>>  }
>
> regards,
> dan carpenter

Thanks, I'll fix up the newly-added one in a respin of this patch and
fix up existing labels in a future patch.

-- 
Todd
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux