Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753787AbbDCRIS (ORCPT ); Fri, 3 Apr 2015 13:08:18 -0400 Received: from pandora.arm.linux.org.uk ([78.32.30.218]:33700 "EHLO pandora.arm.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753763AbbDCRIN (ORCPT ); Fri, 3 Apr 2015 13:08:13 -0400 Date: Fri, 3 Apr 2015 18:07:57 +0100 From: Russell King - ARM Linux To: Geert Uytterhoeven Cc: Dan Carpenter , driverdevel , "devicetree@vger.kernel.org" , Kuninori Morimoto , Geert Uytterhoeven , Arnd Bergmann , Linux PM list , Marc Zyngier , Greg Kroah-Hartman , Linux-sh list , Magnus Damm , "linux-kernel@vger.kernel.org" , Laurent Pinchart , Simon Horman , "linux-arm-kernel@lists.infradead.org" Subject: Re: [PATCH/RFC 5/6] staging: board: Add support for devices with complex dependencies Message-ID: <20150403170757.GB13898@n2100.arm.linux.org.uk> References: <1428064923-24950-1-git-send-email-geert+renesas@glider.be> <1428064923-24950-6-git-send-email-geert+renesas@glider.be> <20150403125727.GT10964@mwanda> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1469 Lines: 33 On Fri, Apr 03, 2015 at 03:27:40PM +0200, Geert Uytterhoeven wrote: > 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. Yes, that's because the per-user struct clk messed quite a lot of things up - the patches were /not/ well tested before they went in. That's no excuse to work around the breakage they caused though. That said, I never did post the work I did earlier this month to fix the problems in clkdev which those patches caused... so, I guess it's time to post them and rush them in for the 4.1 merge window... (frankly, the per-user struct clk patches should've been reverted.) -- FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up according to speedtest.net. -- 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/