summaryrefslogtreecommitdiffstats
path: root/drivers/media/i2c/smiapp
diff options
context:
space:
mode:
authorSakari Ailus <sakari.ailus@linux.intel.com>2014-04-15 15:22:11 -0300
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-05-23 11:30:22 -0300
commitaca6bf5432dafb44791128c3e181c59ec87af041 (patch)
treede9472927e8834e17958c3537f40279ae1d6aa53 /drivers/media/i2c/smiapp
parente5a3f7b88295fbf221d4c371f361e40dfc735b50 (diff)
downloadlinux-stable-aca6bf5432dafb44791128c3e181c59ec87af041.tar.gz
linux-stable-aca6bf5432dafb44791128c3e181c59ec87af041.tar.bz2
linux-stable-aca6bf5432dafb44791128c3e181c59ec87af041.zip
[media] smiapp: Scaling goodness is signed
The "best" value was unsigned however, leading to signed-to-unsigned comparison and wrong results. Possibly only on a newer GCC. Fix this by making the best value signed as well. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media/i2c/smiapp')
-rw-r--r--drivers/media/i2c/smiapp/smiapp-core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/i2c/smiapp/smiapp-core.c b/drivers/media/i2c/smiapp/smiapp-core.c
index 0a74e145e1d2..db3d5a64d2ca 100644
--- a/drivers/media/i2c/smiapp/smiapp-core.c
+++ b/drivers/media/i2c/smiapp/smiapp-core.c
@@ -1766,7 +1766,7 @@ static void smiapp_set_compose_binner(struct v4l2_subdev *subdev,
struct smiapp_sensor *sensor = to_smiapp_sensor(subdev);
unsigned int i;
unsigned int binh = 1, binv = 1;
- unsigned int best = scaling_goodness(
+ int best = scaling_goodness(
subdev,
crops[SMIAPP_PAD_SINK]->width, sel->r.width,
crops[SMIAPP_PAD_SINK]->height, sel->r.height, sel->flags);