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>
Mon, 14 May 2018 14:32:00 +0000 (16:32 +0200)
commit955bc61328dc0a297fb3baccd84e9d3aee501ed8
treebd102bfd117485fe861ff3d0f9aeee93d35dcf00
parentbd23a7269834dc7c1f93e83535d16ebc44b75eba
w1: mxc_w1: Enable clock before calling clk_get_rate() on it

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