w1: mxc_w1: Enable clock before calling clk_get_rate() on it
authorStefan Potyra <Stefan.Potyra@elektrobit.com>
Wed, 2 May 2018 08:55:31 +0000 (10:55 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 26 Jun 2018 00:06:32 +0000 (08:06 +0800)
commite6ef46cb8f01b67266a1adc1c323b5b67086b8e8
treee1888104926ea0c3a880466b779c81a4077915b8
parent0667483adeeefdedd21cc636cd224632d5570980
w1: mxc_w1: Enable clock before calling clk_get_rate() on it

commit 955bc61328dc0a297fb3baccd84e9d3aee501ed8 upstream.

According to the API, you may only call clk_get_rate() after actually
enabling it.

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

Fixes: a5fd9139f74c ("w1: add 1-wire master driver for i.MX27 / i.MX31")
Signed-off-by: Stefan Potyra <Stefan.Potyra@elektrobit.com>
Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/w1/masters/mxc_w1.c