Commit df2da9a3 authored by Dan Carpenter's avatar Dan Carpenter Committed by Greg Kroah-Hartman

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: default avatarDan Carpenter <dan.carpenter@oracle.com>
Acked-by: default avatarSascha Hauer <s.hauer@pengutronix.de>
Acked-by: default avatarMarek Vasut <marex@denx.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 234ad182
......@@ -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) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment