All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Dan Carpenter <error27@gmail.com>
Subject: Re: [PATCH v1] clk: devres: fix cleanup in devm_clk_get_optional_enabled_with_rate()
Date: Sun, 9 Aug 2026 00:53:01 +0800	[thread overview]
Message-ID: <202608090025.dwxdfqFr-lkp@intel.com> (raw)

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
In-Reply-To: <20260801111637.304590-1-work@onurozkan.dev>
References: <20260801111637.304590-1-work@onurozkan.dev>
TO: "Onur Özkan" <work@onurozkan.dev>
TO: linux-clk@vger.kernel.org
TO: linux-kernel@vger.kernel.org
CC: mturquette@baylibre.com
CC: sboyd@kernel.org
CC: bmasney@redhat.com
CC: daniel.almeida@collabora.com
CC: "Onur Özkan" <work@onurozkan.dev>

Hi Onur,

kernel test robot noticed the following build warnings:

[auto build test WARNING on linux-review/Daniel-Almeida/rust-clk-use-the-type-state-pattern/20260706-224926]

url:    https://github.com/intel-lab-lkp/linux/commits/Onur-zkan/clk-devres-fix-cleanup-in-devm_clk_get_optional_enabled_with_rate/20260805-211528
base:   https://github.com/intel-lab-lkp/linux Daniel-Almeida/rust-clk-use-the-type-state-pattern/20260706-224926
patch link:    https://lore.kernel.org/r/20260801111637.304590-1-work%40onurozkan.dev
patch subject: [PATCH v1] clk: devres: fix cleanup in devm_clk_get_optional_enabled_with_rate()
:::::: branch date: 3 days ago
:::::: commit date: 3 days ago
config: parisc-randconfig-r071-20260808 (https://download.01.org/0day-ci/archive/20260809/202608090025.dwxdfqFr-lkp@intel.com/config)
compiler: hppa-linux-gcc (GCC) 11.5.0
smatch: v0.5.0-9187-g5189e3fb

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
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202608090025.dwxdfqFr-lkp@intel.com/

smatch warnings:
drivers/clk/clk-devres.c:134 devm_clk_get_optional_enabled_with_rate() warn: 'clk' from clk_prepare_enable() not released on lines: 134.

vim +/clk +134 drivers/clk/clk-devres.c

1c34a54a924f326 Onur Özkan          2026-08-01  106  
9934a1bd45b2b03 Bartosz Golaszewski 2024-08-05  107  struct clk *devm_clk_get_optional_enabled_with_rate(struct device *dev,
9934a1bd45b2b03 Bartosz Golaszewski 2024-08-05  108  						    const char *id,
9934a1bd45b2b03 Bartosz Golaszewski 2024-08-05  109  						    unsigned long rate)
9934a1bd45b2b03 Bartosz Golaszewski 2024-08-05  110  {
9934a1bd45b2b03 Bartosz Golaszewski 2024-08-05  111  	struct clk *clk;
9934a1bd45b2b03 Bartosz Golaszewski 2024-08-05  112  	int ret;
9934a1bd45b2b03 Bartosz Golaszewski 2024-08-05  113  
1c34a54a924f326 Onur Özkan          2026-08-01  114  	clk = devm_clk_get_optional(dev, id);
9934a1bd45b2b03 Bartosz Golaszewski 2024-08-05  115  	if (IS_ERR(clk))
9934a1bd45b2b03 Bartosz Golaszewski 2024-08-05  116  		return ERR_CAST(clk);
9934a1bd45b2b03 Bartosz Golaszewski 2024-08-05  117  
9934a1bd45b2b03 Bartosz Golaszewski 2024-08-05  118  	ret = clk_set_rate(clk, rate);
9934a1bd45b2b03 Bartosz Golaszewski 2024-08-05  119  	if (ret)
9934a1bd45b2b03 Bartosz Golaszewski 2024-08-05  120  		goto out_put_clk;
9934a1bd45b2b03 Bartosz Golaszewski 2024-08-05  121  
9934a1bd45b2b03 Bartosz Golaszewski 2024-08-05  122  	ret = clk_prepare_enable(clk);
9934a1bd45b2b03 Bartosz Golaszewski 2024-08-05  123  	if (ret)
9934a1bd45b2b03 Bartosz Golaszewski 2024-08-05  124  		goto out_put_clk;
9934a1bd45b2b03 Bartosz Golaszewski 2024-08-05  125  
1c34a54a924f326 Onur Özkan          2026-08-01  126  	ret = devm_add_action_or_reset(dev, devm_clk_disable_unprepare, clk);
1c34a54a924f326 Onur Özkan          2026-08-01  127  	if (ret)
1c34a54a924f326 Onur Özkan          2026-08-01  128  		goto out_put_clk;
1c34a54a924f326 Onur Özkan          2026-08-01  129  
9934a1bd45b2b03 Bartosz Golaszewski 2024-08-05  130  	return clk;
9934a1bd45b2b03 Bartosz Golaszewski 2024-08-05  131  
9934a1bd45b2b03 Bartosz Golaszewski 2024-08-05  132  out_put_clk:
9934a1bd45b2b03 Bartosz Golaszewski 2024-08-05  133  	devm_clk_put(dev, clk);
9934a1bd45b2b03 Bartosz Golaszewski 2024-08-05 @134  	return ERR_PTR(ret);
9934a1bd45b2b03 Bartosz Golaszewski 2024-08-05  135  }
9934a1bd45b2b03 Bartosz Golaszewski 2024-08-05  136  EXPORT_SYMBOL_GPL(devm_clk_get_optional_enabled_with_rate);
9934a1bd45b2b03 Bartosz Golaszewski 2024-08-05  137  

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

             reply	other threads:[~2026-08-08 16:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-08 16:53 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2026-08-01 11:16 [PATCH v1] clk: devres: fix cleanup in devm_clk_get_optional_enabled_with_rate() Onur Özkan
2026-08-03 13:28 ` Brian Masney

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202608090025.dwxdfqFr-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=error27@gmail.com \
    --cc=oe-kbuild@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.