public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: kernel-janitors@vger.kernel.org
Subject: Re: [patch] staging: drm/imx: ipu-dc: signedness bug in ipu_dc_init_sync()
Date: Wed, 21 Aug 2013 08:40:59 +0000	[thread overview]
Message-ID: <20130821084059.GP31036@pengutronix.de> (raw)
In-Reply-To: <20130821083008.GD5240@elgon.mountain>

On Wed, Aug 21, 2013 at 11:30:08AM +0300, Dan Carpenter wrote:
> "map" needs to be signed for the error handling to work.  In the success
> case then it holds a small non-negative value.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Acked-by: Sascha Hauer <s.hauer@pengutronix.de>

Sascha

> 
> diff --git a/drivers/staging/imx-drm/ipu-v3/ipu-dc.c b/drivers/staging/imx-drm/ipu-v3/ipu-dc.c
> index 59f03f9..21bf1c8 100644
> --- a/drivers/staging/imx-drm/ipu-v3/ipu-dc.c
> +++ b/drivers/staging/imx-drm/ipu-v3/ipu-dc.c
> @@ -161,14 +161,15 @@ int ipu_dc_init_sync(struct ipu_dc *dc, struct ipu_di *di, bool interlaced,
>  		u32 pixel_fmt, u32 width)
>  {
>  	struct ipu_dc_priv *priv = dc->priv;
> -	u32 reg = 0, map;
> +	u32 reg = 0;
> +	int map;
>  
>  	dc->di = ipu_di_get_num(di);
>  
>  	map = ipu_pixfmt_to_map(pixel_fmt);
>  	if (map < 0) {
>  		dev_dbg(priv->dev, "IPU_DISP: No MAP\n");
> -		return -EINVAL;
> +		return map;
>  	}
>  
>  	if (interlaced) {
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

      parent reply	other threads:[~2013-08-21  8:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-21  8:30 [patch] staging: drm/imx: ipu-dc: signedness bug in ipu_dc_init_sync() Dan Carpenter
2013-08-21  8:32 ` Marek Vasut
2013-08-21  8:40 ` Sascha Hauer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130821084059.GP31036@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=kernel-janitors@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox