Re: [PATCH] drivers/w1: free the w1_master at w1_free_dev and returna correct return value

From: devendra.aaru
Date: Sat Jun 23 2012 - 14:26:10 EST


Hi Greg,
On Thu, Jun 21, 2012 at 8:09 PM, Greg Kroah-Hartman
<gregkh@xxxxxxxxxxxxxxxxxxx> wrote:
> On Thu, Jun 21, 2012 at 10:14:53AM +0530, devendra.aaru wrote:
>> Hi Greg,
>>
>> Yeah, correct but the following change is correct no?
>>
>>  int w1_add_master_device(struct w1_bus_master *master)
>> @@ -148,7 +149,7 @@ int w1_add_master_device(struct w1_bus_master *master)
>>                &w1_master_driver, &w1_master_device);
>>        if (!dev) {
>>                mutex_unlock(&w1_mlock);
>> -               return -ENOMEM;
>> +               return -ENODEV;
>
> Possibly, care to resend it in a format that explains it and allows it
> to be applied?
>
I think i need to go through the kernel doc, and figure out what
should be returned and why.
I think we need to send -EINVAL as most of the drivers does if their
registration fails.

It may take more time to send the patch out :(. sorry.
> thanks,
>
> greg k-h

Thanks,
Devendra.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/