Re: [PATCH 3/4] media: atomisp: mt9m114: Add missing mutex_init() call

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

 



On Sun, Oct 13, 2024 at 05:40:55PM +0200, Hans de Goede wrote:
> The input_lock was not being initialized, fix this.
> 
> Also switch to devm_kzalloc() for the main driver data struct, so that
> devm_mutex_init() can be used for this.

...

>  		ret = mt9m114_s_config(&dev->sd, client->irq, pdata);
>  	if (!pdata || ret) {

Hmm... What is the ret value when no pdata is provided?

>  		v4l2_device_unregister_subdev(&dev->sd);
> -		kfree(dev);
>  		return ret;
>  	}

...

>  	ret = atomisp_register_i2c_module(&dev->sd, pdata);
>  	if (ret) {
>  		v4l2_device_unregister_subdev(&dev->sd);
> -		kfree(dev);
>  		/* Coverity CID 298095 - return on error */

This comment is useless. But it seems we tend to drop this code completely in
the future.

>  		return ret;
>  	}

-- 
With Best Regards,
Andy Shevchenko






[Index of Archives]     [Linux Driver Development]     [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