* [linux-next:master 2764/5318] drivers/net/can/flexcan.c:666 flexcan_clks_enable() error: uninitialized symbol 'err'.
@ 2021-08-05 11:22 Dan Carpenter
2021-08-05 11:45 ` Marc Kleine-Budde
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2021-08-05 11:22 UTC (permalink / raw)
To: kbuild, Angelo Dureghello
Cc: lkp, kbuild-all, Linux Memory Management List, Marc Kleine-Budde
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 2f73937c9aa561e2082839bc1a8efaac75d6e244
commit: d9cead75b1c66b4660b4f87ff339234042d7c6a5 [2764/5318] can: flexcan: add mcf5441x support
config: h8300-randconfig-m031-20210804 (attached as .config)
compiler: h8300-linux-gcc (GCC) 10.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>
smatch warnings:
drivers/net/can/flexcan.c:666 flexcan_clks_enable() error: uninitialized symbol 'err'.
vim +/err +666 drivers/net/can/flexcan.c
ca10989632d882 Aisheng Dong 2018-11-30 650 static int flexcan_clks_enable(const struct flexcan_priv *priv)
ca10989632d882 Aisheng Dong 2018-11-30 651 {
ca10989632d882 Aisheng Dong 2018-11-30 652 int err;
ca10989632d882 Aisheng Dong 2018-11-30 653
d9cead75b1c66b Angelo Dureghello 2021-07-02 654 if (priv->clk_ipg) {
ca10989632d882 Aisheng Dong 2018-11-30 655 err = clk_prepare_enable(priv->clk_ipg);
ca10989632d882 Aisheng Dong 2018-11-30 656 if (err)
ca10989632d882 Aisheng Dong 2018-11-30 657 return err;
d9cead75b1c66b Angelo Dureghello 2021-07-02 658 }
ca10989632d882 Aisheng Dong 2018-11-30 659
d9cead75b1c66b Angelo Dureghello 2021-07-02 660 if (priv->clk_per) {
ca10989632d882 Aisheng Dong 2018-11-30 661 err = clk_prepare_enable(priv->clk_per);
ca10989632d882 Aisheng Dong 2018-11-30 662 if (err)
ca10989632d882 Aisheng Dong 2018-11-30 663 clk_disable_unprepare(priv->clk_ipg);
d9cead75b1c66b Angelo Dureghello 2021-07-02 664 }
Smatch is complaining that both priv->clk_ipg and priv->clk_per can be
false... Probably impossible in real life.
ca10989632d882 Aisheng Dong 2018-11-30 665
ca10989632d882 Aisheng Dong 2018-11-30 @666 return err;
ca10989632d882 Aisheng Dong 2018-11-30 667 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [linux-next:master 2764/5318] drivers/net/can/flexcan.c:666 flexcan_clks_enable() error: uninitialized symbol 'err'.
2021-08-05 11:22 [linux-next:master 2764/5318] drivers/net/can/flexcan.c:666 flexcan_clks_enable() error: uninitialized symbol 'err' Dan Carpenter
@ 2021-08-05 11:45 ` Marc Kleine-Budde
0 siblings, 0 replies; 2+ messages in thread
From: Marc Kleine-Budde @ 2021-08-05 11:45 UTC (permalink / raw)
To: Dan Carpenter
Cc: kbuild, Angelo Dureghello, lkp, kbuild-all, Linux Memory Management List
[-- Attachment #1: Type: text/plain, Size: 2477 bytes --]
On 05.08.2021 14:22:24, Dan Carpenter wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> head: 2f73937c9aa561e2082839bc1a8efaac75d6e244
> commit: d9cead75b1c66b4660b4f87ff339234042d7c6a5 [2764/5318] can: flexcan: add mcf5441x support
> config: h8300-randconfig-m031-20210804 (attached as .config)
> compiler: h8300-linux-gcc (GCC) 10.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>
>
> smatch warnings:
> drivers/net/can/flexcan.c:666 flexcan_clks_enable() error: uninitialized symbol 'err'.
>
> vim +/err +666 drivers/net/can/flexcan.c
>
> ca10989632d882 Aisheng Dong 2018-11-30 650 static int flexcan_clks_enable(const struct flexcan_priv *priv)
> ca10989632d882 Aisheng Dong 2018-11-30 651 {
> ca10989632d882 Aisheng Dong 2018-11-30 652 int err;
> ca10989632d882 Aisheng Dong 2018-11-30 653
> d9cead75b1c66b Angelo Dureghello 2021-07-02 654 if (priv->clk_ipg) {
> ca10989632d882 Aisheng Dong 2018-11-30 655 err = clk_prepare_enable(priv->clk_ipg);
> ca10989632d882 Aisheng Dong 2018-11-30 656 if (err)
> ca10989632d882 Aisheng Dong 2018-11-30 657 return err;
> d9cead75b1c66b Angelo Dureghello 2021-07-02 658 }
> ca10989632d882 Aisheng Dong 2018-11-30 659
> d9cead75b1c66b Angelo Dureghello 2021-07-02 660 if (priv->clk_per) {
> ca10989632d882 Aisheng Dong 2018-11-30 661 err = clk_prepare_enable(priv->clk_per);
> ca10989632d882 Aisheng Dong 2018-11-30 662 if (err)
> ca10989632d882 Aisheng Dong 2018-11-30 663 clk_disable_unprepare(priv->clk_ipg);
> d9cead75b1c66b Angelo Dureghello 2021-07-02 664 }
>
> Smatch is complaining that both priv->clk_ipg and priv->clk_per can be
> false... Probably impossible in real life.
Fixed in net-next with:
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commit/?id=3362666972137724496984b4db2b06071aca4b69
Marc
--
Pengutronix e.K. | Marc Kleine-Budde |
Embedded Linux | https://www.pengutronix.de |
Vertretung West/Dortmund | Phone: +49-231-2826-924 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-08-05 11:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-05 11:22 [linux-next:master 2764/5318] drivers/net/can/flexcan.c:666 flexcan_clks_enable() error: uninitialized symbol 'err' Dan Carpenter
2021-08-05 11:45 ` Marc Kleine-Budde
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).