]> git.baikalelectronics.ru Git - kernel.git/commit
serial: max310x: Unprepare and disable clock in error path
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Fri, 25 Jun 2021 15:37:33 +0000 (18:37 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 21 Jul 2021 10:51:54 +0000 (12:51 +0200)
commit7a8a8b2d7854f23635ecc88b36b29902f538bbe1
tree2edced4947352ac5dc0f016ebeb36da9c67212ef
parent6e818c7f8de32c63462f5a745b7397a46ba3001b
serial: max310x: Unprepare and disable clock in error path

In one error case the clock may be left prepared and enabled.
Unprepare and disable clock in that case to balance state of
the hardware.

Fixes: 9e055cc4cb93 ("serial: max310x: Try to get crystal clock rate from property")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20210625153733.12911-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/max310x.c