[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202212080729.ChsUgoMZ-lkp@intel.com>
Date: Thu, 8 Dec 2022 09:25:38 +0300
From: Dan Carpenter <error27@...il.com>
To: oe-kbuild@...ts.linux.dev, Xiaojian Du <Xiaojian.Du@....com>
Cc: lkp@...el.com, oe-kbuild-all@...ts.linux.dev,
linux-kernel@...r.kernel.org,
Alex Deucher <alexander.deucher@....com>,
Huang Rui <ray.huang@....com>
Subject: drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c:928 gmc_v6_0_hw_init() warn:
missing error code? 'r'
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 8ed710da2873c2aeb3bb805864a699affaf1d03b
commit: 479e3b02b73a2de2b19df2950863149c59d57bfe drm/amdgpu: add vram check function for GMC
config: mips-randconfig-m031-20221207
compiler: mips-linux-gcc (GCC) 12.1.0
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>
| Reported-by: Dan Carpenter <error27@...il.com>
smatch warnings:
drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c:928 gmc_v6_0_hw_init() warn: missing error code? 'r'
vim +/r +928 drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c
df70502eef80be Ken Wang 2016-01-19 906 static int gmc_v6_0_hw_init(void *handle)
df70502eef80be Ken Wang 2016-01-19 907 {
df70502eef80be Ken Wang 2016-01-19 908 int r;
df70502eef80be Ken Wang 2016-01-19 909 struct amdgpu_device *adev = (struct amdgpu_device *)handle;
df70502eef80be Ken Wang 2016-01-19 910
df70502eef80be Ken Wang 2016-01-19 911 gmc_v6_0_mc_program(adev);
df70502eef80be Ken Wang 2016-01-19 912
df70502eef80be Ken Wang 2016-01-19 913 if (!(adev->flags & AMD_IS_APU)) {
df70502eef80be Ken Wang 2016-01-19 914 r = gmc_v6_0_mc_load_microcode(adev);
df70502eef80be Ken Wang 2016-01-19 915 if (r) {
075719c3cb79f3 Tom St Denis 2016-09-06 916 dev_err(adev->dev, "Failed to load MC firmware!\n");
df70502eef80be Ken Wang 2016-01-19 917 return r;
df70502eef80be Ken Wang 2016-01-19 918 }
df70502eef80be Ken Wang 2016-01-19 919 }
df70502eef80be Ken Wang 2016-01-19 920
df70502eef80be Ken Wang 2016-01-19 921 r = gmc_v6_0_gart_enable(adev);
df70502eef80be Ken Wang 2016-01-19 922 if (r)
df70502eef80be Ken Wang 2016-01-19 923 return r;
df70502eef80be Ken Wang 2016-01-19 924
479e3b02b73a2d Xiaojian Du 2022-01-17 925 if (amdgpu_emu_mode == 1)
479e3b02b73a2d Xiaojian Du 2022-01-17 926 return amdgpu_gmc_vram_checking(adev);
479e3b02b73a2d Xiaojian Du 2022-01-17 927 else
df70502eef80be Ken Wang 2016-01-19 @928 return r;
This seems like a false positive, but it would be more readable as
"return 0;" instead of "return r;"
df70502eef80be Ken Wang 2016-01-19 929 }
--
0-DAY CI Kernel Test Service
https://01.org/lkp
Powered by blists - more mailing lists