From patchwork Fri Aug 22 13:49:29 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nishanth Menon X-Patchwork-Id: 35823 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oa0-f70.google.com (mail-oa0-f70.google.com [209.85.219.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 9D0BC20540 for ; Fri, 22 Aug 2014 13:51:05 +0000 (UTC) Received: by mail-oa0-f70.google.com with SMTP id eb12sf63882168oac.1 for ; Fri, 22 Aug 2014 06:51:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe:content-type; bh=8nMfYJmxgRJyjL18K1C+Pq5YHxoQRNPfjp5gYp+xY04=; b=UgAu6j2BdjZ7ABwv2lfIx5ec+Wy+ELZa9QpBJxtN0JrKMXJUDfUPKldzSBgkGqFAeW lyqxHnXztsWp+9Jo+a2mKiiVF02yQB3qaWnLrVdsvX9wkj+WdJHQ6UCC4l6EmP50/iOO 1Bd3WJJKiVQYzJ0f1xt2SBmAiDJef998Eeq/U1e0wcRR/l/p3H7BajMRXjlLQyQOcaLR zKMJfwSx+29khTKG8jGjNCdACREYEpbOs6wZOpvaF3Odd2yMMQeLUrswfvto7D1Mq5gG KLGdJWXTvmJy7mv6xU/d4LBfjVZHnp5m4Z4l3SToOhpMMThAnyJqnD5WY/TeoUBrMgKR 6Eeg== X-Gm-Message-State: ALoCoQnwagLbk4fUQcq9jFskUycuEJNicejpbR9dmr2L8n47hTGnpiapoiVAg+xU0+FGGys5pdbc X-Received: by 10.182.4.73 with SMTP id i9mr3427375obi.28.1408715465259; Fri, 22 Aug 2014 06:51:05 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.86.9 with SMTP id o9ls1184799qgd.47.gmail; Fri, 22 Aug 2014 06:51:05 -0700 (PDT) X-Received: by 10.221.38.4 with SMTP id tg4mr250648vcb.44.1408715464991; Fri, 22 Aug 2014 06:51:04 -0700 (PDT) Received: from mail-vc0-f172.google.com (mail-vc0-f172.google.com [209.85.220.172]) by mx.google.com with ESMTPS id 20si13600228vdb.67.2014.08.22.06.51.04 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 22 Aug 2014 06:51:04 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.172 as permitted sender) client-ip=209.85.220.172; Received: by mail-vc0-f172.google.com with SMTP id im17so12341663vcb.17 for ; Fri, 22 Aug 2014 06:51:04 -0700 (PDT) X-Received: by 10.220.97.5 with SMTP id j5mr4206462vcn.16.1408715464926; Fri, 22 Aug 2014 06:51:04 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.45.67 with SMTP id uj3csp18536vcb; Fri, 22 Aug 2014 06:51:04 -0700 (PDT) X-Received: by 10.68.164.4 with SMTP id ym4mr6570720pbb.53.1408715464032; Fri, 22 Aug 2014 06:51:04 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id gj10si40858630pbd.96.2014.08.22.06.51.03 for ; Fri, 22 Aug 2014 06:51:04 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756518AbaHVNuT (ORCPT + 21 others); Fri, 22 Aug 2014 09:50:19 -0400 Received: from comal.ext.ti.com ([198.47.26.152]:58067 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756227AbaHVNuQ (ORCPT ); Fri, 22 Aug 2014 09:50:16 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id s7MDnqlQ013174; Fri, 22 Aug 2014 08:49:52 -0500 Received: from DLEE71.ent.ti.com (dlee71.ent.ti.com [157.170.170.114]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id s7MDnpQ3006154; Fri, 22 Aug 2014 08:49:52 -0500 Received: from dflp33.itg.ti.com (10.64.6.16) by DLEE71.ent.ti.com (157.170.170.114) with Microsoft SMTP Server id 14.3.174.1; Fri, 22 Aug 2014 08:49:51 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id s7MDnp5U011915; Fri, 22 Aug 2014 08:49:51 -0500 From: Nishanth Menon To: Tony Lindgren CC: Kevin Hilman , Tero Kristo , Paul Walmsley , , , , Keerthy , =?UTF-8?q?Beno=C3=AEt=20Cousson?= , Santosh Shilimkar , Nishanth Menon Subject: [PATCH 3/7] ARM: OMAP2+: powerdomain: pwrdm_for_each_clkdm iterate only valid clkdms Date: Fri, 22 Aug 2014 08:49:29 -0500 Message-ID: <1408715373-25791-4-git-send-email-nm@ti.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1408715373-25791-1-git-send-email-nm@ti.com> References: <1408715373-25791-1-git-send-email-nm@ti.com> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: nm@ti.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.172 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , No need to invoke callback when the clkdm pointer is NULL. Signed-off-by: Nishanth Menon --- arch/arm/mach-omap2/powerdomain.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-omap2/powerdomain.c b/arch/arm/mach-omap2/powerdomain.c index faebd5f..f391948 100644 --- a/arch/arm/mach-omap2/powerdomain.c +++ b/arch/arm/mach-omap2/powerdomain.c @@ -546,7 +546,8 @@ int pwrdm_for_each_clkdm(struct powerdomain *pwrdm, return -EINVAL; for (i = 0; i < PWRDM_MAX_CLKDMS && !ret; i++) - ret = (*fn)(pwrdm, pwrdm->pwrdm_clkdms[i]); + if (pwrdm->pwrdm_clkdms[i]) + ret = (*fn)(pwrdm, pwrdm->pwrdm_clkdms[i]); return ret; }