From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E65423EDE43 for ; Sun, 4 Oct 2026 08:09:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.9 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791101383; cv=none; b=rHd8GI4+2uyFtiaLrrXdTFcx2rXzgP4rsn2tr2PdzWaRGAlohA4Ed5j5nCXjokDK9xaxBQHWfpDcGeyELVSCxiAUjEEwNu0wwtPHu8vHfmIpjSWLU5oTyrCmT5M5lj6LVmruSuv1OI+zSs+vqvrJYKXEBZcFGf7+RDPDu+OrFXI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791101383; c=relaxed/simple; bh=d1Qzc5l3b/LTqO98poWr6U+l1oFHww9c81qF6PSulss=; h=Date:From:To:Cc:Subject:Message-ID; b=J8FmxJDkTAQqSdCa8egqdaiGXQyGBZajzqp7Ert/0VOUv2Qn2ZoecloqrXoeMbYCe4DC5b4pRZ1Ci9Gzd/uY3SpDAJTGemHsBCC9RVWcKO2bAbi4RLYJc+tnO5NYh1HiLcRpnwo2R9C9a31PgJq8nNWootSGh8Tz7nj+XZUclr8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=L2PhmKX6; arc=none smtp.client-ip=198.175.65.9 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="L2PhmKX6" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1791101380; x=1822637380; h=date:from:to:cc:subject:message-id; bh=d1Qzc5l3b/LTqO98poWr6U+l1oFHww9c81qF6PSulss=; b=L2PhmKX6qatPSpxAY8jN09E9hWKiDPo0/KqLuxIhVE2rZetCtbJakDTv IgK5n9pZethBnnjOp8nuEnN14ii9H+UT+Xws5p8WtbFgX6uml6ywPTJF7 itHw+pW4l3LUFJNtk/DzL0d+UzMUaxElOOvCcUtyIyUpDkdq560g7+ElY hpZPeoEilDdhpyAwG9ubVYGAd0GIox4sXZr4pxZNFQyBYN8ApQFmS7ItD vvvZu6b37E9ucODUPcMl8ne5NlOIYAc5+hnw6wpcvpjLIXMbsAxZY1QRn VO2e4sguVPeteZY8Sq+BaKcc8QSzhUY2+F8gt1RnGmlqfBnIjTukWn5VI w==; X-CSE-ConnectionGUID: 7vLsTY5pQTazXQ6MrPVfuw== X-CSE-MsgGUID: TepowHkPS76cEXaAo9FmLQ== X-IronPort-AV: E=McAfee;i="6800,10657,11924"; a="113581073" X-IronPort-AV: E=Sophos;i="6.27,139,1787036400"; d="scan'208";a="113581073" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Oct 2026 01:09:38 -0700 X-CSE-ConnectionGUID: myDREIKJQPKRpyoh1VZwqw== X-CSE-MsgGUID: z8JieV7LT+qP/QkRuNKhIQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.27,139,1787036400"; d="scan'208";a="274369169" Received: from igk-lkp-server01.igk.intel.com (HELO 3a02ec7efc9f) ([10.211.93.152]) by orviesa006.jf.intel.com with ESMTP; 04 Oct 2026 01:09:36 -0700 Received: from kbuild by 3a02ec7efc9f with local (Exim 4.98.2) (envelope-from ) id 1xDHHq-000000000FD-1Ot2; Sun, 04 Oct 2026 08:09:34 +0000 Date: Sun, 04 Oct 2026 10:08:48 +0200 From: kernel test robot To: oe-kbuild@lists.linux.dev Cc: lkp@intel.com, Julia Lawall Subject: drivers/pci/pwrctrl/core.c:198:1-7: ERROR: missing put_device; call of_find_device_by_node on line 168, but without a corresponding object release within this function. Message-ID: <202610041029.n0Doj3ta-lkp@intel.com> User-Agent: s-nail v14.9.25 Precedence: bulk X-Mailing-List: oe-kbuild@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: BCC: lkp@intel.com CC: oe-kbuild-all@lists.linux.dev CC: linux-kernel@vger.kernel.org TO: Krishna Chaitanya Chundru CC: Bjorn Helgaas CC: Manivannan Sadhasivam CC: Bartosz Golaszewski tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 6addb4f385570ebc11c4eb499a4f1c149f313e84 commit: 4c413248920106393b35b5e014e6ac525405437e PCI/pwrctrl: Add APIs to create, destroy pwrctrl devices date: 9 months ago :::::: branch date: 4 hours ago :::::: commit date: 9 months ago config: um-randconfig-r2105-20261004 (https://download.01.org/0day-ci/archive/20261004/202610041029.n0Doj3ta-lkp@intel.com/config) compiler: clang version 24.0.0git (https://github.com/llvm/llvm-project d7e4505dd447d115d85fdea45cd71030ac1d86ee) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Fixes: 4c4132489201 ("PCI/pwrctrl: Add APIs to create, destroy pwrctrl devices") | Reported-by: kernel test robot | Reported-by: Julia Lawall | Closes: https://lore.kernel.org/r/202610041029.n0Doj3ta-lkp@intel.com/ cocci warnings: (new ones prefixed by >>) >> drivers/pci/pwrctrl/core.c:198:1-7: ERROR: missing put_device; call of_find_device_by_node on line 168, but without a corresponding object release within this function. vim +198 drivers/pci/pwrctrl/core.c 4565d2652a37e43 drivers/pci/pwrctl/core.c Bartosz Golaszewski 2024-06-12 154 4c4132489201063 drivers/pci/pwrctrl/core.c Krishna Chaitanya Chundru 2026-01-15 155 static int pci_pwrctrl_create_device(struct device_node *np, 4c4132489201063 drivers/pci/pwrctrl/core.c Krishna Chaitanya Chundru 2026-01-15 156 struct device *parent) 4c4132489201063 drivers/pci/pwrctrl/core.c Krishna Chaitanya Chundru 2026-01-15 157 { 4c4132489201063 drivers/pci/pwrctrl/core.c Krishna Chaitanya Chundru 2026-01-15 158 struct platform_device *pdev; 4c4132489201063 drivers/pci/pwrctrl/core.c Krishna Chaitanya Chundru 2026-01-15 159 int ret; 4c4132489201063 drivers/pci/pwrctrl/core.c Krishna Chaitanya Chundru 2026-01-15 160 4c4132489201063 drivers/pci/pwrctrl/core.c Krishna Chaitanya Chundru 2026-01-15 161 for_each_available_child_of_node_scoped(np, child) { 4c4132489201063 drivers/pci/pwrctrl/core.c Krishna Chaitanya Chundru 2026-01-15 162 ret = pci_pwrctrl_create_device(child, parent); 4c4132489201063 drivers/pci/pwrctrl/core.c Krishna Chaitanya Chundru 2026-01-15 163 if (ret) 4c4132489201063 drivers/pci/pwrctrl/core.c Krishna Chaitanya Chundru 2026-01-15 164 return ret; 4c4132489201063 drivers/pci/pwrctrl/core.c Krishna Chaitanya Chundru 2026-01-15 165 } 4c4132489201063 drivers/pci/pwrctrl/core.c Krishna Chaitanya Chundru 2026-01-15 166 4c4132489201063 drivers/pci/pwrctrl/core.c Krishna Chaitanya Chundru 2026-01-15 167 /* Bail out if the platform device is already available for the node */ 4c4132489201063 drivers/pci/pwrctrl/core.c Krishna Chaitanya Chundru 2026-01-15 @168 pdev = of_find_device_by_node(np); 4c4132489201063 drivers/pci/pwrctrl/core.c Krishna Chaitanya Chundru 2026-01-15 169 if (pdev) { 4c4132489201063 drivers/pci/pwrctrl/core.c Krishna Chaitanya Chundru 2026-01-15 170 platform_device_put(pdev); 4c4132489201063 drivers/pci/pwrctrl/core.c Krishna Chaitanya Chundru 2026-01-15 171 return 0; 4c4132489201063 drivers/pci/pwrctrl/core.c Krishna Chaitanya Chundru 2026-01-15 172 } 4c4132489201063 drivers/pci/pwrctrl/core.c Krishna Chaitanya Chundru 2026-01-15 173 4c4132489201063 drivers/pci/pwrctrl/core.c Krishna Chaitanya Chundru 2026-01-15 174 /* 4c4132489201063 drivers/pci/pwrctrl/core.c Krishna Chaitanya Chundru 2026-01-15 175 * Sanity check to make sure that the node has the compatible property 4c4132489201063 drivers/pci/pwrctrl/core.c Krishna Chaitanya Chundru 2026-01-15 176 * to allow driver binding. 4c4132489201063 drivers/pci/pwrctrl/core.c Krishna Chaitanya Chundru 2026-01-15 177 */ 4c4132489201063 drivers/pci/pwrctrl/core.c Krishna Chaitanya Chundru 2026-01-15 178 if (!of_property_present(np, "compatible")) 4c4132489201063 drivers/pci/pwrctrl/core.c Krishna Chaitanya Chundru 2026-01-15 179 return 0; 4c4132489201063 drivers/pci/pwrctrl/core.c Krishna Chaitanya Chundru 2026-01-15 180 4c4132489201063 drivers/pci/pwrctrl/core.c Krishna Chaitanya Chundru 2026-01-15 181 /* 4c4132489201063 drivers/pci/pwrctrl/core.c Krishna Chaitanya Chundru 2026-01-15 182 * Check whether the pwrctrl device really needs to be created or not. 4c4132489201063 drivers/pci/pwrctrl/core.c Krishna Chaitanya Chundru 2026-01-15 183 * This is decided based on at least one of the power supplies being 4c4132489201063 drivers/pci/pwrctrl/core.c Krishna Chaitanya Chundru 2026-01-15 184 * defined in the devicetree node of the device. 4c4132489201063 drivers/pci/pwrctrl/core.c Krishna Chaitanya Chundru 2026-01-15 185 */ 4c4132489201063 drivers/pci/pwrctrl/core.c Krishna Chaitanya Chundru 2026-01-15 186 if (!of_pci_supply_present(np)) { 4c4132489201063 drivers/pci/pwrctrl/core.c Krishna Chaitanya Chundru 2026-01-15 187 dev_dbg(parent, "Skipping OF node: %s\n", np->name); 4c4132489201063 drivers/pci/pwrctrl/core.c Krishna Chaitanya Chundru 2026-01-15 188 return 0; 4c4132489201063 drivers/pci/pwrctrl/core.c Krishna Chaitanya Chundru 2026-01-15 189 } 4c4132489201063 drivers/pci/pwrctrl/core.c Krishna Chaitanya Chundru 2026-01-15 190 4c4132489201063 drivers/pci/pwrctrl/core.c Krishna Chaitanya Chundru 2026-01-15 191 /* Now create the pwrctrl device */ 4c4132489201063 drivers/pci/pwrctrl/core.c Krishna Chaitanya Chundru 2026-01-15 192 pdev = of_platform_device_create(np, NULL, parent); 4c4132489201063 drivers/pci/pwrctrl/core.c Krishna Chaitanya Chundru 2026-01-15 193 if (!pdev) { 4c4132489201063 drivers/pci/pwrctrl/core.c Krishna Chaitanya Chundru 2026-01-15 194 dev_err(parent, "Failed to create pwrctrl device for node: %s\n", np->name); 4c4132489201063 drivers/pci/pwrctrl/core.c Krishna Chaitanya Chundru 2026-01-15 195 return -EINVAL; 4c4132489201063 drivers/pci/pwrctrl/core.c Krishna Chaitanya Chundru 2026-01-15 196 } 4c4132489201063 drivers/pci/pwrctrl/core.c Krishna Chaitanya Chundru 2026-01-15 197 4c4132489201063 drivers/pci/pwrctrl/core.c Krishna Chaitanya Chundru 2026-01-15 @198 return 0; 4c4132489201063 drivers/pci/pwrctrl/core.c Krishna Chaitanya Chundru 2026-01-15 199 } 4c4132489201063 drivers/pci/pwrctrl/core.c Krishna Chaitanya Chundru 2026-01-15 200 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki