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

From: Russell King - ARM Linux
Date: Wed Apr 18 2012 - 05:56:06 EST


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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/