[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <lsq.1511315893.982088477@decadent.org.uk>
Date: Wed, 22 Nov 2017 01:58:13 +0000
From: Ben Hutchings <ben@...adent.org.uk>
To: linux-kernel@...r.kernel.org, stable@...r.kernel.org
CC: akpm@...ux-foundation.org, "Mathias Kresin" <dev@...sin.me>,
linux-m68k@...ts.linux-m68k.org,
"Geert Uytterhoeven" <geert@...ux-m68k.org>,
"Greg Ungerer" <gerg@...ux-m68k.org>,
"Jonas Gorski" <jonas.gorski@...il.com>
Subject: [PATCH 3.16 054/133] m68k: allow NULL clock for clk_get_rate
3.16.51-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Jonas Gorski <jonas.gorski@...il.com>
commit 94b282267c2f3af725b154c91275ed374c1f11de upstream.
Make the behaviour of clk_get_rate consistent with common clk's
clk_get_rate by accepting NULL clocks as parameter. Some device
drivers rely on this, and will cause an OOPS otherwise.
Fixes: facdf0ed4f59 ("m68knommu: introduce basic clk infrastructure")
Cc: Greg Ungerer <gerg@...ux-m68k.org>
Cc: Geert Uytterhoeven <geert@...ux-m68k.org>
Cc: linux-m68k@...ts.linux-m68k.org
Cc: linux-kernel@...r.kernel.org
Reported-by: Mathias Kresin <dev@...sin.me>
Signed-off-by: Jonas Gorski <jonas.gorski@...il.com>
Signed-off-by: Greg Ungerer <gerg@...ux-m68k.org>
[bwh: Backported to 3.16: adjust filename]
Signed-off-by: Ben Hutchings <ben@...adent.org.uk>
---
arch/m68k/platform/coldfire/clk.c | 3 +++
1 file changed, 3 insertions(+)
--- a/arch/m68k/platform/coldfire/clk.c
+++ b/arch/m68k/platform/coldfire/clk.c
@@ -117,6 +117,9 @@ EXPORT_SYMBOL(clk_put);
unsigned long clk_get_rate(struct clk *clk)
{
+ if (!clk)
+ return 0;
+
return clk->rate;
}
EXPORT_SYMBOL(clk_get_rate);
Powered by blists - more mailing lists