diff options
author | Arnd Bergmann <arnd@arndb.de> | 2017-03-01 00:14:37 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-02-25 13:05:54 +0300 |
commit | 7cc1178e8ccf9a0816ebf8f82ec4a778d4ca68ac (patch) | |
tree | 0deb1519e731b422899e883d118f776ae1bd1c9f /drivers/media/platform/vsp1/vsp1_rwpf.c | |
parent | 507baad9ffb8fc01985337a964e3c6530e9ad5ab (diff) | |
download | linux-7cc1178e8ccf9a0816ebf8f82ec4a778d4ca68ac.tar.xz |
tw5864: use dev_warn instead of WARN to shut up warning
commit 27430d19a91615245babaa9b216d0807636903a0 upstream.
tw5864_frameinterval_get() only initializes its output when it successfully
identifies the video standard in tw5864_input. We get a warning here because
gcc can't always track the state if initialized warnings across a WARN()
macro, and thinks it might get used incorrectly in tw5864_s_parm:
media/pci/tw5864/tw5864-video.c: In function 'tw5864_s_parm':
media/pci/tw5864/tw5864-video.c:816:38: error: 'time_base.numerator' may be used uninitialized in this function [-Werror=maybe-uninitialized]
media/pci/tw5864/tw5864-video.c:819:31: error: 'time_base.denominator' may be used uninitialized in this function [-Werror=maybe-uninitialized]
Using dev_warn() instead of WARN() avoids the __branch_check__() in
unlikely and lets the compiler see that the initialization is correct.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Andrey Utkin <andrey.utkin@corp.bluecherry.net>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/media/platform/vsp1/vsp1_rwpf.c')
0 files changed, 0 insertions, 0 deletions