Search Linux Wireless

Re: [RFC][PATCH v2 3/7] NFC: add nfc generic netlink interface

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

 



Hi Gustavo,

On Tue, Jun 21, 2011 at 7:05 PM, Gustavo F. Padovan
<padovan@xxxxxxxxxxxxxx> wrote:
>>  static int __init nfc_init(void)
>>  {
>> +     int rc;
>> +
>>       printk(KERN_INFO "NFC Core ver %s\n", VERSION);
>>
>> -     return class_register(&nfc_class);
>> +     rc = class_register(&nfc_class);
>> +     if (rc)
>> +             goto err;
>
> Just return rc here and get rid of the label.
>
ok

>> +/**
>> + * nfc_genl_exit() - Deinitialize netlink interface
>> + *
>> + * This exit function unregisters the nfc netlink family.
>> + */
>> +void nfc_genl_exit(void)
>
> You may want __exit here.

The nfc_genl_exit() is called in  '__init nfc_init(void)' if any error
occurs. In that case we will have an __exit code inside an __init
code, resulting in a section mismatch.

Aloisio
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux