Re: [PATCH v1 05/10] staging: atomisp: Remove non-ACPI leftovers

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

 



On Wed, Dec 20, 2017 at 6:54 AM, Dan Carpenter <dan.carpenter@xxxxxxxxxx> wrote:
> On Tue, Dec 19, 2017 at 10:59:52PM +0200, Andy Shevchenko wrote:
>> @@ -1147,10 +1145,8 @@ static int gc2235_probe(struct i2c_client *client)
>>       if (ret)
>>               gc2235_remove(client);
>
> This error handling is probably wrong...
>

Thanks for pointing to this, but I'm not going to fix this by the
following reasons:
1. I admit the driver's code is ugly
2. It's staging code
3. My patch does not touch those lines
4. My purpose is to get it working first.

Feel free to send a followup with a good clean up which I agree with.

>>
>> -     if (ACPI_HANDLE(&client->dev))
>> -             ret = atomisp_register_i2c_module(&dev->sd, gcpdev, RAW_CAMERA);
>> +     return atomisp_register_i2c_module(&dev->sd, gcpdev, RAW_CAMERA);
>
> In the end this should look something like:
>
>         ret = atomisp_register_i2c_module(&dev->sd, gcpdev, RAW_CAMERA);
>         if (ret)
>                 goto err_free_something;
>
>         return 0;
>
>>
>> -     return ret;
>>  out_free:
>>       v4l2_device_unregister_subdev(&dev->sd);
>>       kfree(dev);
>
> regards,
> dan carpenter
>



-- 
With Best Regards,
Andy Shevchenko
_______________________________________________
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