diff options
author | Nicolas Iooss <nicolas.iooss_linux@m4x.org> | 2016-12-27 16:02:36 -0200 |
---|---|---|
committer | Sasha Levin <alexander.levin@verizon.com> | 2017-05-17 15:06:58 -0400 |
commit | e1d467993c4586d472ff777bec99cb52e1e95584 (patch) | |
tree | fa3292e115757bc23ca8c5d8037caaf5938fdd9f /drivers/media | |
parent | c53e17083e91a26f049836b9d192f61f5ba894b9 (diff) |
[media] am437x-vpfe: always assign bpp variable
[ Upstream commit 6ebf75774f823ddbdbd10921006989d4df222f4a ]
In vpfe_s_fmt(), when the sensor format and the requested format were
the same, bpp was assigned to vpfe->bpp without being initialized first.
Grab the bpp value that is currently used by using __vpfe_get_format()
instead of its wrapper, vpfe_try_fmt().
This use of uninitialized variable has been found by compiling the
kernel with clang.
Fixes: 417d2e507edc ("[media] media: platform: add VPFE capture driver
support for AM437X")
Cc: stable@vger.kernel.org
Signed-off-by: Nicolas Iooss <nicolas.iooss_linux@m4x.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/platform/am437x/am437x-vpfe.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/platform/am437x/am437x-vpfe.c b/drivers/media/platform/am437x/am437x-vpfe.c index ddf59ee5ca40..fd7f66072413 100644 --- a/drivers/media/platform/am437x/am437x-vpfe.c +++ b/drivers/media/platform/am437x/am437x-vpfe.c @@ -1587,7 +1587,7 @@ static int vpfe_s_fmt(struct file *file, void *priv, return -EBUSY; } - ret = vpfe_try_fmt(file, priv, &format); + ret = __vpfe_get_format(vpfe, &format, &bpp); if (ret) return ret; |