Re: [PATCH 17/20] media: atomisp: Move calling of css_[un]init() to power_on()/_off()

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

 



On Sun, Nov 20, 2022 at 11:40:58PM +0100, Hans de Goede wrote:
> atomisp_css_init() is always called after calling atomisp_power_on()
> either directly or through getting a runtime-pm reference.
> 
> Likewise atomisp_css_uninit() is always called after calling
> atomisp_power_off().
> 
> Move the call site of these 2 functions to inside atomisp_power_on() /
> atomisp_power_off() to make this more explicit.

...

>  	dev_dbg(isp->dev, "%s\n", __func__);
> -	atomisp_css_uninit(isp);
> +
>  	ret = atomisp_power_off(isp->dev);
>  	if (ret < 0)
>  		dev_err(isp->dev, "atomisp_power_off failed, %d\n", ret);
>  
>  	ret = atomisp_power_on(isp->dev);
> -	if (ret < 0)
> +	if (ret < 0) {
>  		dev_err(isp->dev, "atomisp_power_on failed, %d\n", ret);
> -
> -	ret = atomisp_css_init(isp);
> -	if (ret)

>  		isp->isp_fatal_error = true;

This was only set when css_init() failed, now it may be set even when
power_on() fails. Why is it not a problem? Commit message doesn't shed
a light on this change.

> +	}

-- 
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