From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============5803293201008748003==" MIME-Version: 1.0 From: Daniel Scally To: kbuild-all@lists.01.org Subject: Re: [rui:linux-next 9/13] drivers/acpi/scan.c:2152 acpi_walk_dep_device_list() error: uninitialized symbol 'ret'. Date: Mon, 28 Jun 2021 11:04:04 +0100 Message-ID: <9d52e69c-91d1-0f2a-d2ff-54ed03f8092e@gmail.com> In-Reply-To: <202106271939.rqCCyzR1-lkp@intel.com> List-Id: --===============5803293201008748003== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hi Dan On 28/06/2021 10:06, Dan Carpenter wrote: > tree: https://git.kernel.org/pub/scm/linux/kernel/git/rui/linux.git lin= ux-next > head: efd4c04742d30bb71022f50cd5451a0fbe52aa56 > commit: 018f81b667154ad8ee504bc36f52dc26f4f1cb87 [9/13] ACPI: scan: Exten= d acpi_walk_dep_device_list() > config: i386-randconfig-m021-20210627 (attached as .config) > compiler: gcc-9 (Debian 9.3.0-22) 9.3.0 > > If you fix the issue, kindly add following tag as appropriate > Reported-by: kernel test robot > Reported-by: Dan Carpenter > > smatch warnings: > drivers/acpi/scan.c:2152 acpi_walk_dep_device_list() error: uninitialized= symbol 'ret'. > > vim +/ret +2152 drivers/acpi/scan.c > > 018f81b667154a Daniel Scally 2021-06-03 2135 int acpi_walk_dep_device_l= ist(acpi_handle handle, > 018f81b667154a Daniel Scally 2021-06-03 2136 int (*callback)(s= truct acpi_dep_data *, void *), > 018f81b667154a Daniel Scally 2021-06-03 2137 void *data) > 018f81b667154a Daniel Scally 2021-06-03 2138 { > 018f81b667154a Daniel Scally 2021-06-03 2139 struct acpi_dep_data *dep= , *tmp; > 018f81b667154a Daniel Scally 2021-06-03 2140 int ret; > 018f81b667154a Daniel Scally 2021-06-03 2141 = > 018f81b667154a Daniel Scally 2021-06-03 2142 mutex_lock(&acpi_dep_list= _lock); > 018f81b667154a Daniel Scally 2021-06-03 2143 list_for_each_entry_safe(= dep, tmp, &acpi_dep_list, node) { > 018f81b667154a Daniel Scally 2021-06-03 2144 if (dep->supplier =3D=3D= handle) { > > I haven't looked at the context, but it feels like we should to handle > the case where handle is not found. Agreed; Colin spotted this one and patched it already actually: https://lore.kernel.org/lkml/20210609173312.298414-1-colin.king(a)canonical= .com/ > > 018f81b667154a Daniel Scally 2021-06-03 2145 ret =3D callback(dep, d= ata); > 018f81b667154a Daniel Scally 2021-06-03 2146 if (ret) > 018f81b667154a Daniel Scally 2021-06-03 2147 break; > 40e7fcb19293cb Lan Tianyu 2014-11-23 2148 } > 40e7fcb19293cb Lan Tianyu 2014-11-23 2149 } > 40e7fcb19293cb Lan Tianyu 2014-11-23 2150 mutex_unlock(&acpi_dep_li= st_lock); > 018f81b667154a Daniel Scally 2021-06-03 2151 = > 018f81b667154a Daniel Scally 2021-06-03 @2152 return ret > 0 ? 0 : ret; > 40e7fcb19293cb Lan Tianyu 2014-11-23 2153 } > > --- > 0-DAY CI Kernel Test Service, Intel Corporation > https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org > --===============5803293201008748003==--