[PATCH v1] drivers/tty/serial/8250: check the return value of clk_set_rate()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Check the return of clk_set_rate() which could fail if there is error
setting the rate.

Signed-off-by: Li Zhong <floridsleeves@xxxxxxxxx>
---
 drivers/tty/serial/8250/8250_bcm7271.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/tty/serial/8250/8250_bcm7271.c b/drivers/tty/serial/8250/8250_bcm7271.c
index 8efdc271eb75..9014853d6e35 100644
--- a/drivers/tty/serial/8250/8250_bcm7271.c
+++ b/drivers/tty/serial/8250/8250_bcm7271.c
@@ -671,7 +671,9 @@ static void init_real_clk_rates(struct device *dev, struct brcmuart_priv *priv)
 			priv->real_rates[x] = clk_get_rate(priv->baud_mux_clk);
 		}
 	}
-	clk_set_rate(priv->baud_mux_clk, priv->default_mux_rate);
+	rc = clk_set_rate(priv->baud_mux_clk, priv->default_mux_rate);
+	if (rc)
+		dev_err(dev, "Error restoring default BAUD MUX clock\n");
 }
 
 static void set_clock_mux(struct uart_port *up, struct brcmuart_priv *priv,
-- 
2.25.1




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux