Re: [PATCH 8/9] media: i2c: mt9m114: goto proper error path

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

 



Hi Hans,

Thank you for the patch.

On Fri, Oct 06, 2023 at 12:08:49PM +0200, Hans Verkuil wrote:
> In two places the probe function returns instead of going
> to the correct goto label.
> 
> This fixes this smatch warning:
> 
> drivers/media/i2c/mt9m114.c:2381 mt9m114_probe() warn: missing unwind goto?
> 
> Signed-off-by: Hans Verkuil <hverkuil-cisco@xxxxxxxxx>
> CC: Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx>

I've already submitted
https://lore.kernel.org/linux-media/20231003192043.27690-1-laurent.pinchart@xxxxxxxxxxxxxxxx

> ---
>  drivers/media/i2c/mt9m114.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/media/i2c/mt9m114.c b/drivers/media/i2c/mt9m114.c
> index dae675e52390..ac19078ceda3 100644
> --- a/drivers/media/i2c/mt9m114.c
> +++ b/drivers/media/i2c/mt9m114.c
> @@ -2367,7 +2367,7 @@ static int mt9m114_probe(struct i2c_client *client)
>  
>  	ret = mt9m114_clk_init(sensor);
>  	if (ret)
> -		return ret;
> +		goto error_ep_free;
>  
>  	/*
>  	 * Identify the sensor. The driver supports runtime PM, but needs to
> @@ -2378,7 +2378,7 @@ static int mt9m114_probe(struct i2c_client *client)
>  	ret = mt9m114_power_on(sensor);
>  	if (ret < 0) {
>  		dev_err_probe(dev, ret, "Could not power on the device\n");
> -		return ret;
> +		goto error_ep_free;
>  	}
>  
>  	ret = mt9m114_identify(sensor);

-- 
Regards,

Laurent Pinchart



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux