On Thu, Sep 08, 2016 at 04:40:53PM -0300, Fabio Estevam wrote: > From: Fabio Estevam <fabio.estevam@xxxxxxx> > > We should disable the previously acquired clock when enabling s->clk > fails. > > Signed-off-by: Fabio Estevam <fabio.estevam@xxxxxxx> > --- > drivers/tty/serial/mxs-auart.c | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > diff --git a/drivers/tty/serial/mxs-auart.c b/drivers/tty/serial/mxs-auart.c > index 2f04ec2..9c2bfde 100644 > --- a/drivers/tty/serial/mxs-auart.c > +++ b/drivers/tty/serial/mxs-auart.c > @@ -1543,10 +1543,15 @@ static int mxs_get_clks(struct mxs_auart_port *s, > err = clk_prepare_enable(s->clk); > if (err) { > dev_err(s->dev, "Failed to enable clk!\n"); > - return err; > + goto disable_clk_ahb; > } > > return 0; > + > +disable_clk_ahb: > + clk_disable_unprepare(s->clk_ahb); > + return err; > + > } To match my taste, drop the last introduced empty line. Otherwise (and even if you want to keep that line): Reviewed-by: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx> Best regards Uwe -- Pengutronix e.K. | Uwe Kleine-König | Industrial Linux Solutions | http://www.pengutronix.de/ | -- To unsubscribe from this list: send the line "unsubscribe linux-serial" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html