linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: paul@pwsan.com (Paul Walmsley)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 06/11] OMAP clockdomain: if no autodeps exist, don't try to add or remove them
Date: Mon, 22 Feb 2010 21:50:52 -0700	[thread overview]
Message-ID: <20100223045050.18888.84634.stgit@localhost.localdomain> (raw)
In-Reply-To: <20100223044915.18888.83242.stgit@localhost.localdomain>

_clkdm_add_autodeps() and _clkdm_del_autodeps() will attempt to dereference
a NULL pointer if no autodeps were supplied to clkdm_init().

Based on a patch from Roel Kluin <roel.kluin@gmail.com> - thanks Roel.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Roel Kluin <roel.kluin@gmail.com>
---
 arch/arm/mach-omap2/clockdomain.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/clockdomain.c b/arch/arm/mach-omap2/clockdomain.c
index de4278c..b26d30a 100644
--- a/arch/arm/mach-omap2/clockdomain.c
+++ b/arch/arm/mach-omap2/clockdomain.c
@@ -173,6 +173,9 @@ static void _clkdm_add_autodeps(struct clockdomain *clkdm)
 {
 	struct clkdm_autodep *autodep;
 
+	if (!autodeps)
+		return;
+
 	for (autodep = autodeps; autodep->clkdm.ptr; autodep++) {
 		if (IS_ERR(autodep->clkdm.ptr))
 			continue;
@@ -201,6 +204,9 @@ static void _clkdm_del_autodeps(struct clockdomain *clkdm)
 {
 	struct clkdm_autodep *autodep;
 
+	if (!autodeps)
+		return;
+
 	for (autodep = autodeps; autodep->clkdm.ptr; autodep++) {
 		if (IS_ERR(autodep->clkdm.ptr))
 			continue;

  parent reply	other threads:[~2010-02-23  4:50 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-23  4:50 [PATCH 00/11] OMAP clock/hwmod: final set of 2.6.34 patches Paul Walmsley
2010-02-23  4:50 ` [PATCH 01/11] OMAP3: clock: add capability to change rate of dpll4_m5_ck_3630 Paul Walmsley
2010-02-23  4:50 ` [PATCH 02/11] OMAP clock: add omap_clk_get_by_name() for use by OMAP hwmod core code Paul Walmsley
2010-02-23  4:50 ` [PATCH 03/11] OMAP hwmod: convert hwmod to use hardware clock names rather than clkdev dev+con Paul Walmsley
2010-02-23  4:50 ` [PATCH 04/11] OMAP hwmod: convert header files with static allocations into C files Paul Walmsley
2010-02-23  4:50 ` [PATCH 05/11] OMAP hwmod: add hwmod class support Paul Walmsley
2010-02-23  4:50 ` Paul Walmsley [this message]
2010-02-23  4:50 ` [PATCH 07/11] OMAP2/3 clock: combine OMAP2 & 3 boot-time MPU rate change code Paul Walmsley
2010-02-23  4:50 ` [PATCH 08/11] OMAP2+ clock: revise omap2_clk_{disable,enable}() Paul Walmsley
2010-02-23  4:50 ` [PATCH 09/11] OMAP4: clock: Rename leaf clock nodes to end with a _ick or _fck Paul Walmsley
2010-02-23  4:50 ` [PATCH 10/11] OMAP4: clock: Add dummy clock nodes for interface clocks Paul Walmsley
2010-02-23  4:50 ` [PATCH 11/11] OMAP4: clock: Remove clock hacks from timer-gp.c Paul Walmsley
2010-02-24  5:05 ` [PATCH 00/11] OMAP clock/hwmod: final set of 2.6.34 patches Shilimkar, Santosh

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=20100223045050.18888.84634.stgit@localhost.localdomain \
    --to=paul@pwsan.com \
    --cc=linux-arm-kernel@lists.infradead.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 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).