Skip to contentSkip to conversation

drivers/clk/renesas/rcar-gen3-cpg.c:472:42-45: ERROR: reference preceded by free on line 470 (fwd)

PATCH In review Julia Lawall 2 participants 2 messages Jan 31, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 6/7 drivers/clk/renesas/rcar-gen3-cpg.c:472:42-45: ERROR: reference preceded by free on line 470 (fwd)

Hello,

I guess that a return is missing after line 470.

julia

---------- Forwarded message ----------
Date: Thu, 31 Jan 2019 10:08:10 +0800
From: kbuild test robot <[email protected]>
To: [email protected]
Cc: Julia Lawall <[email protected]>
Subject: [renesas-drivers:clk-renesas-for-v5.1 6/7]
drivers/clk/renesas/rcar-gen3-cpg.c:472:42-45: ERROR: reference preceded by free on line 470

CC: [email protected]
CC: [email protected]
TO: Sergei Shtylyov <[email protected]>
CC: Geert Uytterhoeven <[email protected]>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers.git clk-renesas-for-v5.1
head:   5f8c668738ae4bcfe0656e74127610aabd5d5141
commit: ac41e5750e7508c170b6a1d9d623c4caa4c0fbf6 [6/7] clk: renesas: rcar-gen3: Add RPC clocks

:::::: branch date: 6 days ago
:::::: commit date: 6 days ago

Quoted 1 line
Quoted 1 line

drivers/clk/renesas/rcar-gen3-cpg.c:472:42-45: ERROR: reference preceded by free on line 470

# https://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers.git/commit/?id=ac41e5750e7508c170b6a1d9d623c4caa4c0fbf6
git remote add renesas-drivers https://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers.git
git remote update renesas-drivers
git checkout ac41e5750e7508c170b6a1d9d623c4caa4c0fbf6
vim +472 drivers/clk/renesas/rcar-gen3-cpg.c

ac41e575 Sergei Shtylyov 2019-01-22  442
ac41e575 Sergei Shtylyov 2019-01-22  443  static struct clk * __init cpg_rpc_clk_register(const char *name,
ac41e575 Sergei Shtylyov 2019-01-22  444  	void __iomem *base, const char *parent_name,
ac41e575 Sergei Shtylyov 2019-01-22  445  	struct raw_notifier_head *notifiers)
ac41e575 Sergei Shtylyov 2019-01-22  446  {
ac41e575 Sergei Shtylyov 2019-01-22  447  	struct rpc_clock *rpc;
ac41e575 Sergei Shtylyov 2019-01-22  448  	struct clk *clk;
ac41e575 Sergei Shtylyov 2019-01-22  449
ac41e575 Sergei Shtylyov 2019-01-22  450  	rpc = kzalloc(sizeof(*rpc), GFP_KERNEL);
ac41e575 Sergei Shtylyov 2019-01-22  451  	if (!rpc)
ac41e575 Sergei Shtylyov 2019-01-22  452  		return ERR_PTR(-ENOMEM);
ac41e575 Sergei Shtylyov 2019-01-22  453
ac41e575 Sergei Shtylyov 2019-01-22  454  	rpc->div.reg = base + CPG_RPCCKCR;
ac41e575 Sergei Shtylyov 2019-01-22  455  	rpc->div.width = 3;
ac41e575 Sergei Shtylyov 2019-01-22  456  	rpc->div.table = cpg_rpc_div_table;
ac41e575 Sergei Shtylyov 2019-01-22  457  	rpc->div.lock = &cpg_lock;
ac41e575 Sergei Shtylyov 2019-01-22  458
ac41e575 Sergei Shtylyov 2019-01-22  459  	rpc->gate.reg = base + CPG_RPCCKCR;
ac41e575 Sergei Shtylyov 2019-01-22  460  	rpc->gate.bit_idx = 8;
ac41e575 Sergei Shtylyov 2019-01-22  461  	rpc->gate.flags = CLK_GATE_SET_TO_DISABLE;
ac41e575 Sergei Shtylyov 2019-01-22  462  	rpc->gate.lock = &cpg_lock;
ac41e575 Sergei Shtylyov 2019-01-22  463
ac41e575 Sergei Shtylyov 2019-01-22  464  	rpc->csn.reg = base + CPG_RPCCKCR;
ac41e575 Sergei Shtylyov 2019-01-22  465
ac41e575 Sergei Shtylyov 2019-01-22  466  	clk = clk_register_composite(NULL, name, &parent_name, 1, NULL, NULL,
ac41e575 Sergei Shtylyov 2019-01-22  467  				     &rpc->div.hw,  &clk_divider_ops,
ac41e575 Sergei Shtylyov 2019-01-22  468  				     &rpc->gate.hw, &clk_gate_ops, 0);
ac41e575 Sergei Shtylyov 2019-01-22  469  	if (IS_ERR(clk))
ac41e575 Sergei Shtylyov 2019-01-22 @470  		kfree(rpc);
ac41e575 Sergei Shtylyov 2019-01-22  471
ac41e575 Sergei Shtylyov 2019-01-22 @472  	cpg_simple_notifier_register(notifiers, &rpc->csn);
ac41e575 Sergei Shtylyov 2019-01-22  473  	return clk;
ac41e575 Sergei Shtylyov 2019-01-22  474  }

ac41e575 Sergei Shtylyov 2019-01-22 475

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

#1 lore raw

Hi Julia,

Quoted 1 line · Julia Lawall

I guess that a return is missing after line 470.

Thank you, indeed.

I will fix it up in clk-renesas-for-v5.1, as no pull request has been sent for that branch yet.

Quoted 54 lines

---------- Forwarded message ----------
Date: Thu, 31 Jan 2019 10:08:10 +0800
From: kbuild test robot <[email protected]>
To: [email protected]
Cc: Julia Lawall <[email protected]>
Subject: [renesas-drivers:clk-renesas-for-v5.1 6/7]
drivers/clk/renesas/rcar-gen3-cpg.c:472:42-45: ERROR: reference preceded by free on line 470

CC: [email protected]
CC: [email protected]
TO: Sergei Shtylyov <[email protected]>
CC: Geert Uytterhoeven <[email protected]>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers.git clk-renesas-for-v5.1
head:   5f8c668738ae4bcfe0656e74127610aabd5d5141
commit: ac41e5750e7508c170b6a1d9d623c4caa4c0fbf6 [6/7] clk: renesas: rcar-gen3: Add RPC clocks

:::::: branch date: 6 days ago
:::::: commit date: 6 days ago

Quoted 1 line
Quoted 1 line

drivers/clk/renesas/rcar-gen3-cpg.c:472:42-45: ERROR: reference preceded by free on line 470

# https://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers.git/commit/?id=ac41e5750e7508c170b6a1d9d623c4caa4c0fbf6
git remote add renesas-drivers https://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers.git
git remote update renesas-drivers
git checkout ac41e5750e7508c170b6a1d9d623c4caa4c0fbf6
vim +472 drivers/clk/renesas/rcar-gen3-cpg.c

ac41e575 Sergei Shtylyov 2019-01-22  442
ac41e575 Sergei Shtylyov 2019-01-22  443  static struct clk * __init cpg_rpc_clk_register(const char *name,
ac41e575 Sergei Shtylyov 2019-01-22  444        void __iomem *base, const char *parent_name,
ac41e575 Sergei Shtylyov 2019-01-22  445        struct raw_notifier_head *notifiers)
ac41e575 Sergei Shtylyov 2019-01-22  446  {
ac41e575 Sergei Shtylyov 2019-01-22  447        struct rpc_clock *rpc;
ac41e575 Sergei Shtylyov 2019-01-22  448        struct clk *clk;
ac41e575 Sergei Shtylyov 2019-01-22  449
ac41e575 Sergei Shtylyov 2019-01-22  450        rpc = kzalloc(sizeof(*rpc), GFP_KERNEL);
ac41e575 Sergei Shtylyov 2019-01-22  451        if (!rpc)
ac41e575 Sergei Shtylyov 2019-01-22  452                return ERR_PTR(-ENOMEM);
ac41e575 Sergei Shtylyov 2019-01-22  453
ac41e575 Sergei Shtylyov 2019-01-22  454        rpc->div.reg = base + CPG_RPCCKCR;
ac41e575 Sergei Shtylyov 2019-01-22  455        rpc->div.width = 3;
ac41e575 Sergei Shtylyov 2019-01-22  456        rpc->div.table = cpg_rpc_div_table;
ac41e575 Sergei Shtylyov 2019-01-22  457        rpc->div.lock = &cpg_lock;
ac41e575 Sergei Shtylyov 2019-01-22  458
ac41e575 Sergei Shtylyov 2019-01-22  459        rpc->gate.reg = base + CPG_RPCCKCR;
ac41e575 Sergei Shtylyov 2019-01-22  460        rpc->gate.bit_idx = 8;
ac41e575 Sergei Shtylyov 2019-01-22  461        rpc->gate.flags = CLK_GATE_SET_TO_DISABLE;
ac41e575 Sergei Shtylyov 2019-01-22  462        rpc->gate.lock = &cpg_lock;
ac41e575 Sergei Shtylyov 2019-01-22  463
ac41e575 Sergei Shtylyov 2019-01-22  464        rpc->csn.reg = base + CPG_RPCCKCR;
ac41e575 Sergei Shtylyov 2019-01-22  465
ac41e575 Sergei Shtylyov 2019-01-22  466        clk = clk_register_composite(NULL, name, &parent_name, 1, NULL, NULL,
ac41e575 Sergei Shtylyov 2019-01-22  467                                     &rpc->div.hw,  &clk_divider_ops,
Quoted 8 lines
ac41e575 Sergei Shtylyov 2019-01-22  468                                     &rpc->gate.hw, &clk_gate_ops, 0);
ac41e575 Sergei Shtylyov 2019-01-22  469        if (IS_ERR(clk))
ac41e575 Sergei Shtylyov 2019-01-22 @470                kfree(rpc);
ac41e575 Sergei Shtylyov 2019-01-22  471
ac41e575 Sergei Shtylyov 2019-01-22 @472        cpg_simple_notifier_register(notifiers, &rpc->csn);
ac41e575 Sergei Shtylyov 2019-01-22  473        return clk;
ac41e575 Sergei Shtylyov 2019-01-22  474  }
ac41e575 Sergei Shtylyov 2019-01-22  475

Gr{oetje,eeting}s,

Geert

Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds