* Patch "ARM: 8631/1: clkdev: Detect errors in clk_hw_register_clkdev() for mass registration" has been added to the 4.9-stable tree
@ 2017-01-13 7:57 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2017-01-13 7:57 UTC (permalink / raw)
To: geert, gregkh, rmk+kernel; +Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
ARM: 8631/1: clkdev: Detect errors in clk_hw_register_clkdev() for mass registration
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
arm-8631-1-clkdev-detect-errors-in-clk_hw_register_clkdev-for-mass-registration.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From 9388093db44356af911adf3d355b7544a13a63cd Mon Sep 17 00:00:00 2001
From: Geert Uytterhoeven <geert@linux-m68k.org>
Date: Tue, 22 Nov 2016 12:33:11 +0100
Subject: ARM: 8631/1: clkdev: Detect errors in clk_hw_register_clkdev() for mass registration
From: Geert Uytterhoeven <geert@linux-m68k.org>
commit 9388093db44356af911adf3d355b7544a13a63cd upstream.
Unlike clk_register_clkdev(), clk_hw_register_clkdev() doesn't check for
passed error objects from a previous registration call. Hence the caller
of clk_hw_register_*() has to check for errors before calling
clk_hw_register_clkdev*().
Make clk_hw_register_clkdev() more similar to clk_register_clkdev() by
adding this error check, removing the burden from callers that do mass
registration.
Fixes: e4f1b49bda6d6aa2 ("clkdev: Add clk_hw based registration APIs")
Fixes: 944b9a41e004534f ("clk: ls1x: Migrate to clk_hw based OF and registration APIs")
Fixes: 44ce9a9ae977736f ("MIPS: TXx9: Convert to Common Clock Framework")
Fixes: f48d947a162dfa9d ("clk: clps711x: Migrate to clk_hw based OF and registration APIs")
Fixes: b4626a7f489238a5 ("CLK: Add Loongson1C clock support")
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/clk/clkdev.c | 8 ++++++++
1 file changed, 8 insertions(+)
--- a/drivers/clk/clkdev.c
+++ b/drivers/clk/clkdev.c
@@ -448,12 +448,20 @@ EXPORT_SYMBOL(clk_register_clkdev);
*
* con_id or dev_id may be NULL as a wildcard, just as in the rest of
* clkdev.
+ *
+ * To make things easier for mass registration, we detect error clk_hws
+ * from a previous clk_hw_register_*() call, and return the error code for
+ * those. This is to permit this function to be called immediately
+ * after clk_hw_register_*().
*/
int clk_hw_register_clkdev(struct clk_hw *hw, const char *con_id,
const char *dev_id)
{
struct clk_lookup *cl;
+ if (IS_ERR(hw))
+ return PTR_ERR(hw);
+
/*
* Since dev_id can be NULL, and NULL is handled specially, we must
* pass it as either a NULL format string, or with "%s".
Patches currently in stable-queue which might be from geert@linux-m68k.org are
queue-4.9/arm-8631-1-clkdev-detect-errors-in-clk_hw_register_clkdev-for-mass-registration.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-01-13 7:57 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-13 7:57 Patch "ARM: 8631/1: clkdev: Detect errors in clk_hw_register_clkdev() for mass registration" has been added to the 4.9-stable tree gregkh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).