Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1485894 > unrolled thread
| Started by | Masahiro Yamada <yamada.masahiro@socionext.com> |
|---|---|
| First post | 2016-09-18 20:10 +0200 |
| Last post | 2016-09-18 21:40 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH v4] MIPS: bcm63xx: let clk_disable() return immediately if clk is NULL Masahiro Yamada <yamada.masahiro@socionext.com> - 2016-09-18 20:10 +0200
Re: [PATCH v4] MIPS: bcm63xx: let clk_disable() return immediately if clk is NULL Florian Fainelli <f.fainelli@gmail.com> - 2016-09-18 21:40 +0200
| From | Masahiro Yamada <yamada.masahiro@socionext.com> |
|---|---|
| Date | 2016-09-18 20:10 +0200 |
| Subject | [PATCH v4] MIPS: bcm63xx: let clk_disable() return immediately if clk is NULL |
| Message-ID | <siOHo-2YU-19@gated-at.bofh.it> |
In many of clk_disable() implementations, it is a no-op for a NULL
pointer input, but this is one of the exceptions.
Making it treewide consistent will allow clock consumers to call
clk_disable() without NULL pointer check.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---
Changes in v4:
- Split into per-arch patches
Changes in v3:
- Return only when clk is NULL. Do not take care of error pointer.
Changes in v2:
- Rebase on Linux 4.6-rc1
arch/mips/bcm63xx/clk.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/mips/bcm63xx/clk.c b/arch/mips/bcm63xx/clk.c
index 6375652..b49fc9c 100644
--- a/arch/mips/bcm63xx/clk.c
+++ b/arch/mips/bcm63xx/clk.c
@@ -326,6 +326,9 @@ EXPORT_SYMBOL(clk_enable);
void clk_disable(struct clk *clk)
{
+ if (!clk)
+ return;
+
mutex_lock(&clocks_mutex);
clk_disable_unlocked(clk);
mutex_unlock(&clocks_mutex);
--
1.9.1
[toc] | [next] | [standalone]
| From | Florian Fainelli <f.fainelli@gmail.com> |
|---|---|
| Date | 2016-09-18 21:40 +0200 |
| Subject | Re: [PATCH v4] MIPS: bcm63xx: let clk_disable() return immediately if clk is NULL |
| Message-ID | <siQ6t-3Ly-17@gated-at.bofh.it> |
| In reply to | #1485894 |
Le 18/09/2016 à 11:04, Masahiro Yamada a écrit : > In many of clk_disable() implementations, it is a no-op for a NULL > pointer input, but this is one of the exceptions. > > Making it treewide consistent will allow clock consumers to call > clk_disable() without NULL pointer check. > > Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Acked-by: Florian Fainelli <f.fainelli@gmail.com> -- Florian
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web