diff mbox series

[12/17] media: ti: davinci: vpbe_display.c: return 0 instead of 'ret'.

Message ID 20230126150657.367921-13-hverkuil-cisco@xs4all.nl
State Accepted
Commit 0d3732fb1b20d2a636d294cdf51c35f9233d622a
Headers show
Series media: sparse/smatch fixes | expand

Commit Message

Hans Verkuil Jan. 26, 2023, 3:06 p.m. UTC
Since 'ret' is known to be 0, just return '0'. This fixes a smatch warning:

vpbe_display.c:1152 vpbe_display_open() warn: missing error code? 'err'

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Cc: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>
---
 drivers/media/platform/ti/davinci/vpbe_display.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Lad, Prabhakar Jan. 30, 2023, 11:35 p.m. UTC | #1
Hi Hans,

Thank you for the patch.

On Thu, Jan 26, 2023 at 3:07 PM Hans Verkuil <hverkuil-cisco@xs4all.nl> wrote:
>
> Since 'ret' is known to be 0, just return '0'. This fixes a smatch warning:
>
> vpbe_display.c:1152 vpbe_display_open() warn: missing error code? 'err'
>
> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
> Cc: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>
> ---
>  drivers/media/platform/ti/davinci/vpbe_display.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
Reviewed-by: Lad Prabhakar <prabhakar.csengg@gmail.com>

Cheers,
Prabhakar

> diff --git a/drivers/media/platform/ti/davinci/vpbe_display.c b/drivers/media/platform/ti/davinci/vpbe_display.c
> index 9ea70817538e..ea2d0795d1e2 100644
> --- a/drivers/media/platform/ti/davinci/vpbe_display.c
> +++ b/drivers/media/platform/ti/davinci/vpbe_display.c
> @@ -1149,7 +1149,7 @@ static int vpbe_display_open(struct file *file)
>
>         /* leaving if layer is already initialized */
>         if (!v4l2_fh_is_singular_file(file))
> -               return err;
> +               return 0;
>
>         if (!layer->usrs) {
>                 if (mutex_lock_interruptible(&layer->opslock))
> --
> 2.39.0
>
diff mbox series

Patch

diff --git a/drivers/media/platform/ti/davinci/vpbe_display.c b/drivers/media/platform/ti/davinci/vpbe_display.c
index 9ea70817538e..ea2d0795d1e2 100644
--- a/drivers/media/platform/ti/davinci/vpbe_display.c
+++ b/drivers/media/platform/ti/davinci/vpbe_display.c
@@ -1149,7 +1149,7 @@  static int vpbe_display_open(struct file *file)
 
 	/* leaving if layer is already initialized */
 	if (!v4l2_fh_is_singular_file(file))
-		return err;
+		return 0;
 
 	if (!layer->usrs) {
 		if (mutex_lock_interruptible(&layer->opslock))