All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: [mripard:vc4/rework-helpers 12/28] drivers/clk/clk.c:2385 clk_set_min_rate() warn: variable dereferenced before check 'clk' (see line 2383)
Date: Sat, 14 Nov 2020 23:15:07 +0800	[thread overview]
Message-ID: <202011142357.cgCziWOp-lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 2741 bytes --]

CC: kbuild-all(a)lists.01.org
TO: Maxime Ripard <maxime@cerno.tech>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux.git vc4/rework-helpers
head:   0b08b344d2e1241f8135321b3e0421d95d855bc6
commit: 1f25a431c207a9f4e9024f8285b8a97654e78f39 [12/28] clk: trace: Trace range functions
:::::: branch date: 2 days ago
:::::: commit date: 4 days ago
config: i386-randconfig-m021-20201113 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

New smatch warnings:
drivers/clk/clk.c:2385 clk_set_min_rate() warn: variable dereferenced before check 'clk' (see line 2383)

Old smatch warnings:
drivers/clk/clk.c:3655 clk_hw_create_clk() warn: passing zero to 'ERR_CAST'
drivers/clk/clk.c:3825 __clk_register() warn: passing a valid pointer to 'PTR_ERR'

vim +/clk +2385 drivers/clk/clk.c

035a61c314eb3da Tomeu Vizoso  2015-01-23  2373  
035a61c314eb3da Tomeu Vizoso  2015-01-23  2374  /**
4dff95dc9477a34 Stephen Boyd  2015-04-30  2375   * clk_set_min_rate - set a minimum clock rate for a clock source
4dff95dc9477a34 Stephen Boyd  2015-04-30  2376   * @clk: clock source
4dff95dc9477a34 Stephen Boyd  2015-04-30  2377   * @rate: desired minimum clock rate in Hz, inclusive
035a61c314eb3da Tomeu Vizoso  2015-01-23  2378   *
4dff95dc9477a34 Stephen Boyd  2015-04-30  2379   * Returns success (0) or negative errno.
035a61c314eb3da Tomeu Vizoso  2015-01-23  2380   */
4dff95dc9477a34 Stephen Boyd  2015-04-30  2381  int clk_set_min_rate(struct clk *clk, unsigned long rate)
035a61c314eb3da Tomeu Vizoso  2015-01-23  2382  {
1f25a431c207a9f Maxime Ripard 2020-10-01 @2383  	trace_clk_set_min_rate(clk->core, rate);
1f25a431c207a9f Maxime Ripard 2020-10-01  2384  
035a61c314eb3da Tomeu Vizoso  2015-01-23 @2385  	if (!clk)
035a61c314eb3da Tomeu Vizoso  2015-01-23  2386  		return 0;
035a61c314eb3da Tomeu Vizoso  2015-01-23  2387  
4dff95dc9477a34 Stephen Boyd  2015-04-30  2388  	return clk_set_rate_range(clk, rate, clk->max_rate);
035a61c314eb3da Tomeu Vizoso  2015-01-23  2389  }
4dff95dc9477a34 Stephen Boyd  2015-04-30  2390  EXPORT_SYMBOL_GPL(clk_set_min_rate);
a093bde2b45a0a7 Ulf Hansson   2012-08-31  2391  

:::::: The code at line 2385 was first introduced by commit
:::::: 035a61c314eb3dab5bcc5683afaf4d412689858a clk: Make clk API return per-user struct clk instances

:::::: TO: Tomeu Vizoso <tomeu.vizoso@collabora.com>
:::::: CC: Michael Turquette <mturquette@linaro.org>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 30687 bytes --]

             reply	other threads:[~2020-11-14 15:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-14 15:15 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-11-16  9:20 [mripard:vc4/rework-helpers 12/28] drivers/clk/clk.c:2385 clk_set_min_rate() warn: variable dereferenced before check 'clk' (see line 2383) Dan Carpenter
2020-11-16  9:20 ` Dan Carpenter

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=202011142357.cgCziWOp-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild@lists.01.org \
    /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.