Skip to content

Commit

Permalink
tty: xilinx_uartps: Add check for runtime_get_sync calls
Browse files Browse the repository at this point in the history
Add a check for the runtime get_sync calls.

Addresses-Coverity: Event check_return.
Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Signed-off-by: Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>
State: pending
  • Loading branch information
Shubhrajyoti Datta authored and michalsimek committed Dec 12, 2022
1 parent e0cf2d2 commit 12f014f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion drivers/tty/serial/xilinx_uartps.c
Expand Up @@ -1089,13 +1089,17 @@ static void cdns_uart_poll_put_char(struct uart_port *port, unsigned char c)
static void cdns_uart_pm(struct uart_port *port, unsigned int state,
unsigned int oldstate)
{
int ret;

switch (state) {
case UART_PM_STATE_OFF:
pm_runtime_mark_last_busy(port->dev);
pm_runtime_put_autosuspend(port->dev);
break;
default:
pm_runtime_get_sync(port->dev);
ret = pm_runtime_get_sync(port->dev);
if (ret < 0)
dev_err(port->dev, "Failed to enable clocks\n");
break;
}
}
Expand Down

0 comments on commit 12f014f

Please sign in to comment.