4406c813 | 22-Oct-2021 |
Kieran Bingham <kieran.bingham+renesas@ideasonboard.com> |
media: tw5864: Disable PCI device when finished
The cleanup in tw5864_finidev() neglected to disable the PCI device after enabling it in tw5864_initdev().
Call pci_disable_device() after releasing
media: tw5864: Disable PCI device when finished
The cleanup in tw5864_finidev() neglected to disable the PCI device after enabling it in tw5864_initdev().
Call pci_disable_device() after releasing the associated resources.
Signed-off-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
show more ...
|
780d815d | 10-Aug-2020 |
Tom Rix <trix@redhat.com> |
media: tw5864: check status of tw5864_frameinterval_get
clang static analysis reports this problem
tw5864-video.c:773:32: warning: The left expression of the compound assignment is an uninitializ
media: tw5864: check status of tw5864_frameinterval_get
clang static analysis reports this problem
tw5864-video.c:773:32: warning: The left expression of the compound assignment is an uninitialized value. The computed value will also be garbage fintv->stepwise.max.numerator *= std_max_fps; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
stepwise.max is set with frameinterval, which comes from
ret = tw5864_frameinterval_get(input, &frameinterval); fintv->stepwise.step = frameinterval; fintv->stepwise.min = frameinterval; fintv->stepwise.max = frameinterval; fintv->stepwise.max.numerator *= std_max_fps;
When tw5864_frameinterval_get() fails, frameinterval is not set. So check the status and fix another similar problem.
Signed-off-by: Tom Rix <trix@redhat.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
show more ...
|
27430d19 | 28-Feb-2017 |
Arnd Bergmann <arnd@arndb.de> |
[media] tw5864: use dev_warn instead of WARN to shut up warning
tw5864_frameinterval_get() only initializes its output when it successfully identifies the video standard in tw5864_input. We get a wa
[media] tw5864: use dev_warn instead of WARN to shut up warning
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>
show more ...
|