From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1422629AbbISRmx (ORCPT ); Sat, 19 Sep 2015 13:42:53 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:59908 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755629AbbISRkP (ORCPT ); Sat, 19 Sep 2015 13:40:15 -0400 From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Masahiro Yamada , Matthias Brugger Subject: [PATCH 4.2 049/120] serial: 8250_uniphier: call clk_disable_unprepare() on failure path Date: Sat, 19 Sep 2015 10:28:09 -0700 Message-Id: <20150919171716.324190140@linuxfoundation.org> X-Mailer: git-send-email 2.5.3 In-Reply-To: <20150919171712.735441938@linuxfoundation.org> References: <20150919171712.735441938@linuxfoundation.org> User-Agent: quilt/0.64 MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.2-stable review patch. If anyone has any objections, please let me know. ------------------ From: Masahiro Yamada commit e70e69bf205e6d1f742f1cf1935b155417c9e29a upstream. If serial8250_register_8250_port() fails, disable and unprepare the clock before exiting. Fixes: 1a8d2903cb6a ("serial: 8250_uniphier: add UniPhier serial driver") Signed-off-by: Masahiro Yamada Reviewed-by: Matthias Brugger Signed-off-by: Greg Kroah-Hartman --- drivers/tty/serial/8250/8250_uniphier.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/tty/serial/8250/8250_uniphier.c +++ b/drivers/tty/serial/8250/8250_uniphier.c @@ -218,6 +218,7 @@ static int uniphier_uart_probe(struct pl 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; }