Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754828Ab3IXWMc (ORCPT ); Tue, 24 Sep 2013 18:12:32 -0400 Received: from mail-bk0-f52.google.com ([209.85.214.52]:51775 "EHLO mail-bk0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754380Ab3IXWM3 (ORCPT ); Tue, 24 Sep 2013 18:12:29 -0400 MIME-Version: 1.0 In-Reply-To: <524200FB.8010004@gmail.com> References: <1379982078-23381-1-git-send-email-abrestic@chromium.org> <1380046016-5811-1-git-send-email-abrestic@chromium.org> <524200FB.8010004@gmail.com> Date: Tue, 24 Sep 2013 15:12:27 -0700 X-Google-Sender-Auth: iPfpvl4TZEQwy_O6NfE1OLgZOdE Message-ID: Subject: Re: [PATCH V3 1/6] clk: exynos-audss: convert to platform device From: Andrew Bresticker To: Sylwester Nawrocki Cc: linux-samsung-soc , Tomasz Figa , Rob Herring , Pawel Moll , Mark Rutland , Stephen Warren , Ian Campbell , Rob Landley , Kukjin Kim , Russell King , Mike Turquette , Grant Likely , Sachin Kamat , Jiri Kosina , Rahul Sharma , Leela Krishna Amudala , Stephen Boyd , Tushar Behera , Doug Anderson , Padmavathi Venna , devicetree@vger.kernel.org, linux-doc@vger.kernel.org, "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 988 Lines: 31 >> +static int exynos_audss_clk_remove(struct platform_device *pdev) >> +{ >> + int i; >> + >> + of_clk_del_provider(pdev->dev.of_node); >> + >> + for (i = 0; i< EXYNOS_AUDSS_MAX_CLKS; i++) { >> + if (!IS_ERR_OR_NULL(clk_table[i])) >> + clk_unregister(clk_table[i]); >> + } > > > Since we only get here if all the clocks are registered properly and we > always register EXYNOS_AUDSS_MAX_CLKS clocks, couldn't this simply be: > > > for (i = 0; i < EXYNOS_AUDSS_MAX_CLKS; i++) > clk_unregister(clk_table[i]); > > ? Once support is added for Exynos5420, we won't always register EXYNOS_AUDSS_MAX_CLKS clocks, so we'd still need the NULL check. Thanks, Andrew -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/