Skip to content

Commit

Permalink
serial: 8250_uniphier: call clk_disable_unprepare() on failure path
Browse files Browse the repository at this point in the history
If serial8250_register_8250_port() fails, disable and unprepare the
clock before exiting.

Fixes: 1a8d290 ("serial: 8250_uniphier: add UniPhier serial driver")
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Masahiro Yamada authored and Greg Kroah-Hartman committed Aug 3, 2015
1 parent fecf27a commit e70e69b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/tty/serial/8250/8250_uniphier.c
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ static int uniphier_uart_probe(struct platform_device *pdev)
ret = serial8250_register_8250_port(&up);
if (ret < 0) {
dev_err(dev, "failed to register 8250 port\n");
clk_disable_unprepare(priv->clk);
return ret;
}

Expand Down

0 comments on commit e70e69b

Please sign in to comment.