Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753013AbbDCN1o (ORCPT ); Fri, 3 Apr 2015 09:27:44 -0400 Received: from mail-ob0-f181.google.com ([209.85.214.181]:34743 "EHLO mail-ob0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750987AbbDCN1l (ORCPT ); Fri, 3 Apr 2015 09:27:41 -0400 MIME-Version: 1.0 In-Reply-To: <20150403125727.GT10964@mwanda> References: <1428064923-24950-1-git-send-email-geert+renesas@glider.be> <1428064923-24950-6-git-send-email-geert+renesas@glider.be> <20150403125727.GT10964@mwanda> Date: Fri, 3 Apr 2015 15:27:40 +0200 X-Google-Sender-Auth: gIyG_YsvADeggXMGa-2Mv5YJVGU Message-ID: Subject: Re: [PATCH/RFC 5/6] staging: board: Add support for devices with complex dependencies From: Geert Uytterhoeven To: Dan Carpenter Cc: Geert Uytterhoeven , Greg Kroah-Hartman , Magnus Damm , Arnd Bergmann , Simon Horman , Laurent Pinchart , Kuninori Morimoto , driverdevel , "devicetree@vger.kernel.org" , Linux PM list , Marc Zyngier , Linux-sh list , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1229 Lines: 35 On Fri, Apr 3, 2015 at 2:57 PM, Dan Carpenter 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@linux-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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/