diff mbox series

[v4,2/3] drm/bridge: anx7625: fix not correct return value

Message ID 23b62a447364a9047f0b1b144557e8d95f6ad7f7.1611802321.git.xji@analogixsemi.com (mailing list archive)
State New, archived
Headers show
Series Add MIPI rx DPI support | expand

Commit Message

Xin Ji Jan. 28, 2021, 3:09 a.m. UTC
At some time, the original code may return non zero value, force return 0
if operation finished

Signed-off-by: Xin Ji <xji@analogixsemi.com>
---
 drivers/gpu/drm/bridge/analogix/anx7625.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Robert Foss Feb. 4, 2021, 12:28 p.m. UTC | #1
Hi Xin,

On Thu, 28 Jan 2021 at 04:12, Xin Ji <xji@analogixsemi.com> wrote:
>
> At some time, the original code may return non zero value, force return 0
> if operation finished

Missing "." at end of line.

Other than that, this patch looks fine. Feel free to add my r-b.
Reviewed-by: Robert Foss <robert.foss@linaro.org>

>
> Signed-off-by: Xin Ji <xji@analogixsemi.com>
> ---
>  drivers/gpu/drm/bridge/analogix/anx7625.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/bridge/analogix/anx7625.c b/drivers/gpu/drm/bridge/analogix/anx7625.c
> index 65cc059..04536cc 100644
> --- a/drivers/gpu/drm/bridge/analogix/anx7625.c
> +++ b/drivers/gpu/drm/bridge/analogix/anx7625.c
> @@ -189,10 +189,10 @@ static int wait_aux_op_finish(struct anx7625_data *ctx)
>                                AP_AUX_CTRL_STATUS);
>         if (val < 0 || (val & 0x0F)) {
>                 DRM_DEV_ERROR(dev, "aux status %02x\n", val);
> -               val = -EIO;
> +               return -EIO;
>         }
>
> -       return val;
> +       return 0;
>  }
>
>  static int anx7625_video_mute_control(struct anx7625_data *ctx,
> --
> 2.7.4
>
Xin Ji Feb. 5, 2021, 11:40 a.m. UTC | #2
On Thu, Feb 04, 2021 at 01:28:30PM +0100, Robert Foss wrote:
> Hi Xin,
> 
> On Thu, 28 Jan 2021 at 04:12, Xin Ji <xji@analogixsemi.com> wrote:
> >
> > At some time, the original code may return non zero value, force return 0
> > if operation finished
> 
> Missing "." at end of line.
Hi Rob, OK, thanks, I'll add it in the next series.
Thanks,
Xin
> 
> Other than that, this patch looks fine. Feel free to add my r-b.
> Reviewed-by: Robert Foss <robert.foss@linaro.org>
> 
> >
> > Signed-off-by: Xin Ji <xji@analogixsemi.com>
> > ---
> >  drivers/gpu/drm/bridge/analogix/anx7625.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/bridge/analogix/anx7625.c b/drivers/gpu/drm/bridge/analogix/anx7625.c
> > index 65cc059..04536cc 100644
> > --- a/drivers/gpu/drm/bridge/analogix/anx7625.c
> > +++ b/drivers/gpu/drm/bridge/analogix/anx7625.c
> > @@ -189,10 +189,10 @@ static int wait_aux_op_finish(struct anx7625_data *ctx)
> >                                AP_AUX_CTRL_STATUS);
> >         if (val < 0 || (val & 0x0F)) {
> >                 DRM_DEV_ERROR(dev, "aux status %02x\n", val);
> > -               val = -EIO;
> > +               return -EIO;
> >         }
> >
> > -       return val;
> > +       return 0;
> >  }
> >
> >  static int anx7625_video_mute_control(struct anx7625_data *ctx,
> > --
> > 2.7.4
> >
diff mbox series

Patch

diff --git a/drivers/gpu/drm/bridge/analogix/anx7625.c b/drivers/gpu/drm/bridge/analogix/anx7625.c
index 65cc059..04536cc 100644
--- a/drivers/gpu/drm/bridge/analogix/anx7625.c
+++ b/drivers/gpu/drm/bridge/analogix/anx7625.c
@@ -189,10 +189,10 @@  static int wait_aux_op_finish(struct anx7625_data *ctx)
 			       AP_AUX_CTRL_STATUS);
 	if (val < 0 || (val & 0x0F)) {
 		DRM_DEV_ERROR(dev, "aux status %02x\n", val);
-		val = -EIO;
+		return -EIO;
 	}
 
-	return val;
+	return 0;
 }
 
 static int anx7625_video_mute_control(struct anx7625_data *ctx,