diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2013-08-21 11:30:08 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-08-21 10:07:18 -0700 |
commit | df2da9a3fc4b4aeb5c6250006a297f143ca7fcc3 (patch) | |
tree | 8d62a356073857fb4c22eee48cae6e3e96459d6e /drivers/staging/imx-drm | |
parent | 234ad18249a46af8703246a3c417bb4382512d2f (diff) | |
download | linux-df2da9a3fc4b4aeb5c6250006a297f143ca7fcc3.tar.bz2 |
staging: drm/imx: ipu-dc: signedness bug in ipu_dc_init_sync()
"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>
Acked-by: Marek Vasut <marex@denx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/imx-drm')
-rw-r--r-- | drivers/staging/imx-drm/ipu-v3/ipu-dc.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/staging/imx-drm/ipu-v3/ipu-dc.c b/drivers/staging/imx-drm/ipu-v3/ipu-dc.c index 59f03f9aefc3..21bf1c806528 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) { |