Re: [PATCH] [media] ad9389b: fix error return code in ad9389b_probe()

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

 



On Mon May 13 2013 08:00:10 Wei Yongjun wrote:
> From: Wei Yongjun <yongjun_wei@xxxxxxxxxxxxxxxxx>
> 
> Fix to return a negative error code from the error handling
> case instead of 0, as done elsewhere in this function.
> 
> Signed-off-by: Wei Yongjun <yongjun_wei@xxxxxxxxxxxxxxxxx>

Acked-by: Hans Verkuil <hans.verkuil@xxxxxxxxx>

Thanks!

	Hans

> ---
>  drivers/media/i2c/ad9389b.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/media/i2c/ad9389b.c b/drivers/media/i2c/ad9389b.c
> index 58344b6..decef36 100644
> --- a/drivers/media/i2c/ad9389b.c
> +++ b/drivers/media/i2c/ad9389b.c
> @@ -1251,12 +1251,14 @@ static int ad9389b_probe(struct i2c_client *client, const struct i2c_device_id *
>  	state->edid_i2c_client = i2c_new_dummy(client->adapter, (0x7e>>1));
>  	if (state->edid_i2c_client == NULL) {
>  		v4l2_err(sd, "failed to register edid i2c client\n");
> +		err = -ENOMEM;
>  		goto err_entity;
>  	}
>  
>  	state->work_queue = create_singlethread_workqueue(sd->name);
>  	if (state->work_queue == NULL) {
>  		v4l2_err(sd, "could not create workqueue\n");
> +		err = -ENOMEM;
>  		goto err_unreg;
>  	}
>  
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-media" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[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