From: Masahiro Yamada <yamada.masahiro@socionext.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Stephen Boyd <sboyd@codeaurora.org>,
Ralf Baechle <ralf@linux-mips.org>,
Michael Turquette <mturquette@baylibre.com>,
Masahiro Yamada <yamada.masahiro@socionext.com>,
Steven Miao <realmz6@gmail.com>,
adi-buildroot-devel@lists.sourceforge.net,
linux-kernel@vger.kernel.org
Subject: [PATCH v5 3/3] blackfin: bf609: let clk_disable() return immediately if clk is NULL
Date: Tue, 28 Mar 2017 18:17:04 +0900 [thread overview]
Message-ID: <1490692624-11931-4-git-send-email-yamada.masahiro@socionext.com> (raw)
In-Reply-To: <1490692624-11931-1-git-send-email-yamada.masahiro@socionext.com>
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 v5: None
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/blackfin/mach-bf609/clock.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/blackfin/mach-bf609/clock.c b/arch/blackfin/mach-bf609/clock.c
index 3783058..392a59b 100644
--- a/arch/blackfin/mach-bf609/clock.c
+++ b/arch/blackfin/mach-bf609/clock.c
@@ -97,6 +97,9 @@ EXPORT_SYMBOL(clk_enable);
void clk_disable(struct clk *clk)
{
+ if (!clk)
+ return;
+
if (clk->ops && clk->ops->disable)
clk->ops->disable(clk);
}
--
2.7.4
next prev parent reply other threads:[~2017-03-28 9:19 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-28 9:17 [PATCH v5 0/3] clk: let clk_disable() return immediately if clk is NULL for last 3 clks Masahiro Yamada
2017-03-28 9:17 ` Masahiro Yamada
2017-03-28 9:17 ` [PATCH v5 1/3] ARM: mmp: let clk_disable() return immediately if clk is NULL Masahiro Yamada
2017-03-28 9:17 ` Masahiro Yamada
2017-03-30 15:39 ` Arnd Bergmann
2017-03-30 15:39 ` Arnd Bergmann
2017-03-28 9:17 ` [PATCH v5 2/3] ARM: w90x900: " Masahiro Yamada
2017-03-28 9:17 ` Masahiro Yamada
2017-03-30 15:38 ` Arnd Bergmann
2017-03-30 15:38 ` Arnd Bergmann
2017-03-28 9:17 ` Masahiro Yamada [this message]
2017-04-13 3:33 ` [PATCH v5 3/3] blackfin: bf609: " Masahiro Yamada
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1490692624-11931-4-git-send-email-yamada.masahiro@socionext.com \
--to=yamada.masahiro@socionext.com \
--cc=adi-buildroot-devel@lists.sourceforge.net \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=ralf@linux-mips.org \
--cc=realmz6@gmail.com \
--cc=sboyd@codeaurora.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.