[PATCH 2/2] clk: wm831x: Add initial WM831x clock driver

Russell King - ARM Linux linux at arm.linux.org.uk
Wed Apr 18 05:55:56 EDT 2012


On Wed, Apr 18, 2012 at 09:07:13AM +0100, Mark Brown wrote:
> +static __devexit int wm831x_clk_remove(struct platform_device *pdev)
> +{
> +	struct wm831x_clk *clkdata = dev_get_drvdata(&pdev->dev);
> +
> +	clk_unregister(clkdata->clkout_hw.clk);
> +	clk_unregister(clkdata->fll_hw.clk);
> +	clk_unregister(clkdata->xtal_hw.clk);

And another reason returning error codes from unregister functions is a
bad idea - you've just demonstrated above why that is.  You created this
function which returns an error code, but you're not checking it.



More information about the linux-arm-kernel mailing list