From: Antti Palosaari Date: Wed, 7 Aug 2013 03:02:40 +0000 (-0300) Subject: [media] msi3101: fix overflow in freq setting X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=35111f5bc94e790a2ac236dcaf3009c14c5e9f5d;p=linux-beck.git [media] msi3101: fix overflow in freq setting Higher frequencies were not possible to set correctly as that value overflows. Signed-off-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/staging/media/msi3101/sdr-msi3101.c b/drivers/staging/media/msi3101/sdr-msi3101.c index 93168dbd183e..56f97577a760 100644 --- a/drivers/staging/media/msi3101/sdr-msi3101.c +++ b/drivers/staging/media/msi3101/sdr-msi3101.c @@ -1507,11 +1507,11 @@ static int vidioc_s_frequency(struct file *file, void *priv, const struct v4l2_frequency *f) { struct msi3101_state *s = video_drvdata(file); - dev_dbg(&s->udev->dev, "%s: frequency=%u Hz (%d)\n", - __func__, f->frequency * 625U / 10U, f->frequency); + dev_dbg(&s->udev->dev, "%s: frequency=%lu Hz (%u)\n", + __func__, f->frequency * 625UL / 10UL, f->frequency); return v4l2_ctrl_s_ctrl_int64(s->ctrl_tuner_rf, - f->frequency * 625U / 10U); + f->frequency * 625UL / 10UL); } const struct v4l2_ioctl_ops msi3101_ioctl_ops = {