sc16is7xx: Check for an error when the clock is enabled.
authorStefan Potyra <Stefan.Potyra@elektrobit.com>
Tue, 24 Apr 2018 16:03:47 +0000 (18:03 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 25 Apr 2018 12:56:12 +0000 (14:56 +0200)
commite76785d092ab8356d24996754f0ff1917021fcb6
tree185bd4d2e19b1ea151c9786d5b9edac8ef277a11
parent2468b3e4aa7b2a45443c43fced850965ee8118bd
sc16is7xx: Check for an error when the clock is enabled.

When the clock is enabled, check if there is an error. Otherwise
clk_get_rate() can be called without enabled clock.

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

Fixes: 0814e8d5da2b ("sc16is7xx: enable the clock")
Signed-off-by: Stefan Potyra <Stefan.Potyra@elektrobit.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/sc16is7xx.c