[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220429081422.3630070-5-shubhrajyoti.datta@xilinx.com>
Date: Fri, 29 Apr 2022 13:44:19 +0530
From: Shubhrajyoti Datta <shubhrajyoti.datta@...inx.com>
To: <linux-serial@...r.kernel.org>
CC: <michal.simek@...inx.com>, <jirislaby@...nel.org>,
<gregkh@...uxfoundation.org>, <git@...inx.com>,
<linux-kernel@...r.kernel.org>,
Shubhrajyoti Datta <shubhrajyoti.datta@...inx.com>
Subject: [PATCH 4/7] tty: xilinx_uartps: Check clk_enable return value
Check for the clock enable return value.
Addresses-Coverity: Event check_return.
Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@...inx.com>
---
drivers/tty/serial/xilinx_uartps.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/drivers/tty/serial/xilinx_uartps.c b/drivers/tty/serial/xilinx_uartps.c
index 868f4e587263..bf0415f0a194 100644
--- a/drivers/tty/serial/xilinx_uartps.c
+++ b/drivers/tty/serial/xilinx_uartps.c
@@ -1347,12 +1347,18 @@ static int cdns_uart_resume(struct device *device)
unsigned long flags;
u32 ctrl_reg;
int may_wake;
+ int ret;
may_wake = device_may_wakeup(device);
if (console_suspend_enabled && uart_console(port) && !may_wake) {
- clk_enable(cdns_uart->pclk);
- clk_enable(cdns_uart->uartclk);
+ ret = clk_enable(cdns_uart->pclk);
+ if (ret)
+ return ret;
+
+ ret = clk_enable(cdns_uart->uartclk);
+ if (ret)
+ return ret;
spin_lock_irqsave(&port->lock, flags);
--
2.25.1
Powered by blists - more mailing lists