Linux Serial subsystem development
 help / color / mirror / Atom feed
* [PATCH] Check for an error when the clock is enabled.
@ 2018-04-19 13:02 Stefan Potyra
  2018-04-23  7:55 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 3+ messages in thread
From: Stefan Potyra @ 2018-04-19 13:02 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Jiri Slaby, linux-serial, linux-kernel
  Cc: ldv-project, sil2review

Found by Linux Driver Verification project (linuxtesting.org).

Fixes: 0814e8d5da2b sc16is7xx: enable the clock
Signed-off-by: Stefan Potyra <Stefan.Potyra@elektrobit.com>
---
 drivers/tty/serial/sc16is7xx.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/tty/serial/sc16is7xx.c b/drivers/tty/serial/sc16is7xx.c
index 65792a3539d0..243c96025053 100644
--- a/drivers/tty/serial/sc16is7xx.c
+++ b/drivers/tty/serial/sc16is7xx.c
@@ -1168,7 +1168,10 @@ static int sc16is7xx_probe(struct device *dev,
 		else
 			return PTR_ERR(s->clk);
 	} else {
-		clk_prepare_enable(s->clk);
+		ret = clk_prepare_enable(s->clk);
+		if (ret)
+			return ret;
+
 		freq = clk_get_rate(s->clk);
 	}
 
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-04-24 16:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-04-19 13:02 [PATCH] Check for an error when the clock is enabled Stefan Potyra
2018-04-23  7:55 ` Greg Kroah-Hartman
2018-04-24 16:03   ` [PATCH v2] sc16is7xx: " Stefan Potyra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox