* [linux-next:master 3313/9028] drivers/media/pci/tw5864/tw5864-video.c:778:9: warning: Identical condition 'ret', second condition is always false
@ 2020-09-19 5:42 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2020-09-19 5:42 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 4643 bytes --]
CC: kbuild-all(a)lists.01.org
TO: Tom Rix <trix@redhat.com>
CC: Mauro Carvalho Chehab <mchehab@kernel.org>
CC: linux-media(a)vger.kernel.org
CC: Hans Verkuil <hverkuil@xs4all.nl>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: b652d2a5f2a4e93d803cc33eb57fdc41ee528500
commit: 780d815dcc9b34d93ae69385a8465c38d423ff0f [3313/9028] media: tw5864: check status of tw5864_frameinterval_get
:::::: branch date: 21 hours ago
:::::: commit date: 3 weeks ago
compiler: s390-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
cppcheck warnings: (new ones prefixed by >>)
>> drivers/media/pci/tw5864/tw5864-video.c:778:9: warning: Identical condition 'ret', second condition is always false [identicalConditionAfterEarlyExit]
return ret;
^
drivers/media/pci/tw5864/tw5864-video.c:770:6: note: first condition
if (ret)
^
drivers/media/pci/tw5864/tw5864-video.c:778:9: note: second condition
return ret;
^
drivers/media/pci/tw5864/tw5864-video.c:798:9: warning: Identical condition 'ret', second condition is always false [identicalConditionAfterEarlyExit]
return ret;
^
drivers/media/pci/tw5864/tw5864-video.c:791:6: note: first condition
if (ret)
^
drivers/media/pci/tw5864/tw5864-video.c:798:9: note: second condition
return ret;
^
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=780d815dcc9b34d93ae69385a8465c38d423ff0f
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout 780d815dcc9b34d93ae69385a8465c38d423ff0f
vim +/ret +778 drivers/media/pci/tw5864/tw5864-video.c
34d1324edd31541 Andrey Utkin 2016-07-20 748
34d1324edd31541 Andrey Utkin 2016-07-20 749 static int tw5864_enum_frameintervals(struct file *file, void *priv,
34d1324edd31541 Andrey Utkin 2016-07-20 750 struct v4l2_frmivalenum *fintv)
34d1324edd31541 Andrey Utkin 2016-07-20 751 {
34d1324edd31541 Andrey Utkin 2016-07-20 752 struct tw5864_input *input = video_drvdata(file);
34d1324edd31541 Andrey Utkin 2016-07-20 753 struct v4l2_fract frameinterval;
34d1324edd31541 Andrey Utkin 2016-07-20 754 int std_max_fps = input->std == STD_NTSC ? 30 : 25;
34d1324edd31541 Andrey Utkin 2016-07-20 755 struct v4l2_frmsizeenum fsize = { .index = fintv->index,
34d1324edd31541 Andrey Utkin 2016-07-20 756 .pixel_format = fintv->pixel_format };
34d1324edd31541 Andrey Utkin 2016-07-20 757 int ret;
34d1324edd31541 Andrey Utkin 2016-07-20 758
34d1324edd31541 Andrey Utkin 2016-07-20 759 ret = tw5864_enum_framesizes(file, priv, &fsize);
34d1324edd31541 Andrey Utkin 2016-07-20 760 if (ret)
34d1324edd31541 Andrey Utkin 2016-07-20 761 return ret;
34d1324edd31541 Andrey Utkin 2016-07-20 762
34d1324edd31541 Andrey Utkin 2016-07-20 763 if (fintv->width != fsize.discrete.width ||
34d1324edd31541 Andrey Utkin 2016-07-20 764 fintv->height != fsize.discrete.height)
34d1324edd31541 Andrey Utkin 2016-07-20 765 return -EINVAL;
34d1324edd31541 Andrey Utkin 2016-07-20 766
34d1324edd31541 Andrey Utkin 2016-07-20 767 fintv->type = V4L2_FRMIVAL_TYPE_STEPWISE;
34d1324edd31541 Andrey Utkin 2016-07-20 768
34d1324edd31541 Andrey Utkin 2016-07-20 769 ret = tw5864_frameinterval_get(input, &frameinterval);
780d815dcc9b34d Tom Rix 2020-08-10 770 if (ret)
780d815dcc9b34d Tom Rix 2020-08-10 771 return ret;
780d815dcc9b34d Tom Rix 2020-08-10 772
34d1324edd31541 Andrey Utkin 2016-07-20 773 fintv->stepwise.step = frameinterval;
34d1324edd31541 Andrey Utkin 2016-07-20 774 fintv->stepwise.min = frameinterval;
34d1324edd31541 Andrey Utkin 2016-07-20 775 fintv->stepwise.max = frameinterval;
34d1324edd31541 Andrey Utkin 2016-07-20 776 fintv->stepwise.max.numerator *= std_max_fps;
34d1324edd31541 Andrey Utkin 2016-07-20 777
34d1324edd31541 Andrey Utkin 2016-07-20 @778 return ret;
34d1324edd31541 Andrey Utkin 2016-07-20 779 }
34d1324edd31541 Andrey Utkin 2016-07-20 780
:::::: The code at line 778 was first introduced by commit
:::::: 34d1324edd3154105b7a3985c6c4384d602f2ab6 [media] pci: Add tw5864 driver
:::::: TO: Andrey Utkin <andrey.utkin@corp.bluecherry.net>
:::::: CC: Mauro Carvalho Chehab <mchehab@s-opensource.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-09-19 5:42 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-19 5:42 [linux-next:master 3313/9028] drivers/media/pci/tw5864/tw5864-video.c:778:9: warning: Identical condition 'ret', second condition is always false kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.