]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
fpga: dfl: pci: reduce the scope of variable 'ret'
authorXu Yilun <yilun.xu@intel.com>
Mon, 13 Jul 2020 06:10:02 +0000 (14:10 +0800)
committerKhalid Elmously <khalid.elmously@canonical.com>
Sat, 8 Aug 2020 05:53:12 +0000 (01:53 -0400)
commited3c8bb1de2e94fde2569618471626ebf66afbf9
tree5faeafb858c51e03d5eacce60ea066131044e38f
parentf4a9c2afd7c843d5473f8bd9fd95d5e447d0e6b6
fpga: dfl: pci: reduce the scope of variable 'ret'

BugLink: https://bugs.launchpad.net/bugs/1889669
[ Upstream commit e19485dc7a0d210b428a249c0595769bd495fb71 ]

This is to fix lkp cppcheck warnings:

 drivers/fpga/dfl-pci.c:230:6: warning: The scope of the variable 'ret' can be reduced. [variableScope]
    int ret = 0;
        ^

 drivers/fpga/dfl-pci.c:230:10: warning: Variable 'ret' is assigned a value that is never used. [unreadVariable]
    int ret = 0;
            ^

Fixes: 3c2760b78f90 ("fpga: dfl: pci: fix return value of cci_pci_sriov_configure")
Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Xu Yilun <yilun.xu@intel.com>
Acked-by: Wu Hao <hao.wu@intel.com>
Reviewed-by: Tom Rix <trix@redhat.com>
Signed-off-by: Moritz Fischer <mdf@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kelsey Skunberg <kelsey.skunberg@canonical.com>
drivers/fpga/dfl-pci.c