Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934994AbbKTHgQ (ORCPT ); Fri, 20 Nov 2015 02:36:16 -0500 Received: from conuserg009.nifty.com ([202.248.44.35]:59364 "EHLO conuserg009-v.nifty.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1759509AbbKTHgM (ORCPT ); Fri, 20 Nov 2015 02:36:12 -0500 X-Nifty-SrcIP: [119.104.156.250] From: Masahiro Yamada To: linux-clk@vger.kernel.org Cc: Masahiro Yamada , Stephen Boyd , Michael Turquette , linux-kernel@vger.kernel.org Subject: [PATCH 1/3] clk: remove redundant negative index check in of_clk_get_parent_name() Date: Fri, 20 Nov 2015 16:36:19 +0900 Message-Id: <1448004981-11133-1-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 901 Lines: 31 This if-block can be dropped because the of_parse_phandle_with_args() in the following line returns -EINVAL for negative index. Signed-off-by: Masahiro Yamada --- drivers/clk/clk.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index 764aca2..20d8e07 100644 --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c @@ -3062,9 +3062,6 @@ const char *of_clk_get_parent_name(struct device_node *np, int index) int count; struct clk *clk; - if (index < 0) - return NULL; - rc = of_parse_phandle_with_args(np, "clocks", "#clock-cells", index, &clkspec); if (rc) -- 1.9.1 -- 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/