[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMuHMdVhX-MrFxeW5j98NLaQQtJ+DToxkz2Z1+SRSs7YF27RDw@mail.gmail.com>
Date: Fri, 3 Apr 2015 15:27:40 +0200
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Dan Carpenter <dan.carpenter@...cle.com>
Cc: Geert Uytterhoeven <geert+renesas@...der.be>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Magnus Damm <damm+renesas@...nsource.se>,
Arnd Bergmann <arnd@...db.de>,
Simon Horman <horms+renesas@...ge.net.au>,
Laurent Pinchart <Laurent.pinchart@...asonboard.com>,
Kuninori Morimoto <kuninori.morimoto.gx@...esas.com>,
driverdevel <devel@...verdev.osuosl.org>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
Linux PM list <linux-pm@...r.kernel.org>,
Marc Zyngier <marc.zyngier@....com>,
Linux-sh list <linux-sh@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH/RFC 5/6] staging: board: Add support for devices with
complex dependencies
On Fri, Apr 3, 2015 at 2:57 PM, Dan Carpenter <dan.carpenter@...cle.com> wrote:
>> + error = clk_register_clkdev(clk, bsc->con_id, bsc->dev_id);
>> + if (error)
>> + pr_err("Failed to register clock %s (%d)\n", bsc->clk, error);
>> + return error;
>
> Missing curly braces. Also it's weird that don't we need a clk_put()
> on the error patch as well as the success path?
Thanks!
So it worked only by accident: with the new per-user struct clk instances
clk_put() must not be called if clk_register_clkdev() succeeded.
Will call clk_put() only if it failed.
>> +
>> + clk_put(clk);
>> + return 0;
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists