From patchwork Wed Apr 1 06:02:13 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 6137731 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 5906BBF4A6 for ; Wed, 1 Apr 2015 06:02:21 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 893D12021A for ; Wed, 1 Apr 2015 06:02:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 157F720212 for ; Wed, 1 Apr 2015 06:02:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751298AbbDAGCS (ORCPT ); Wed, 1 Apr 2015 02:02:18 -0400 Received: from relmlor2.renesas.com ([210.160.252.172]:32285 "EHLO relmlie1.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751055AbbDAGCR (ORCPT ); Wed, 1 Apr 2015 02:02:17 -0400 Received: from unknown (HELO relmlir4.idc.renesas.com) ([10.200.68.154]) by relmlie1.idc.renesas.com with ESMTP; 01 Apr 2015 15:02:16 +0900 Received: from relmlac2.idc.renesas.com (relmlac2.idc.renesas.com [10.200.69.22]) by relmlir4.idc.renesas.com (Postfix) with ESMTP id 0B2085D23A; Wed, 1 Apr 2015 15:02:16 +0900 (JST) Received: by relmlac2.idc.renesas.com (Postfix, from userid 0) id EE2E82806E; Wed, 1 Apr 2015 15:02:15 +0900 (JST) Received: from relmlac2.idc.renesas.com (localhost [127.0.0.1]) by relmlac2.idc.renesas.com (Postfix) with ESMTP id E4FD22806D; Wed, 1 Apr 2015 15:02:15 +0900 (JST) Received: from relmlii2.idc.renesas.com [10.200.68.66] by relmlac2.idc.renesas.com with ESMTP id RAB22679; Wed, 1 Apr 2015 15:02:15 +0900 X-IronPort-AV: E=Sophos;i="5.11,503,1422889200"; d="scan'208";a="184293413" Received: from mail-sg1lp0089.outbound.protection.outlook.com (HELO APAC01-SG1-obe.outbound.protection.outlook.com) ([207.46.51.89]) by relmlii2.idc.renesas.com with ESMTP/TLS/AES256-SHA; 01 Apr 2015 15:02:15 +0900 Received: from morimoto-PC.renesas.com (211.11.155.132) by SIXPR06MB318.apcprd06.prod.outlook.com (10.141.125.144) with Microsoft SMTP Server (TLS) id 15.1.118.21; Wed, 1 Apr 2015 06:02:13 +0000 Message-ID: <87pp7o2xqg.wl%kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto To: Stephen Boyd , Mike Turquette CC: Simon Horman , Linux-SH , Linux-Kernel , Laurent Subject: [PATCH] clk: shmobile: r8a7779: check return of of_property_read_string_index() User-Agent: Wanderlust/2.15.9 Emacs/24.3 Mule/6.0 MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Date: Wed, 1 Apr 2015 06:02:13 +0000 X-Originating-IP: [211.11.155.132] X-ClientProxiedBy: KAWPR01CA0012.jpnprd01.prod.outlook.com (25.161.24.22) To SIXPR06MB318.apcprd06.prod.outlook.com (10.141.125.144) Authentication-Results: codeaurora.org; dkim=none (message not signed) header.d=none; X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:SIXPR06MB318; X-Microsoft-Antispam-PRVS: X-Forefront-Antispam-Report: BMV:1; SFV:NSPM; SFS:(10019020)(6009001)(77156002)(62966003)(23726002)(19580395003)(46102003)(87976001)(77096005)(92566002)(50986999)(54356999)(83506001)(66066001)(50466002)(86362001)(122386002)(42186005)(47776003)(46406003)(36756003)(19580405001)(33646002)(53416004)(40100003); DIR:OUT; SFP:1102; SCL:1; SRVR:SIXPR06MB318; H:morimoto-PC.renesas.com; FPR:; SPF:None; MLV:sfv; LANG:en; X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(5005006)(5002010); SRVR:SIXPR06MB318; BCL:0; PCL:0; RULEID:; SRVR:SIXPR06MB318; X-Forefront-PRVS: 053315510E X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Apr 2015 06:02:13.5412 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: SIXPR06MB318 Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Kuninori Morimoto This patch indicates error message if return value of of_property_read_string_index() was not zero. Signed-off-by: Kuninori Morimoto --- drivers/clk/shmobile/clk-r8a7779.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/clk/shmobile/clk-r8a7779.c b/drivers/clk/shmobile/clk-r8a7779.c index 652ecac..af439b2 100644 --- a/drivers/clk/shmobile/clk-r8a7779.c +++ b/drivers/clk/shmobile/clk-r8a7779.c @@ -155,8 +155,10 @@ static void __init r8a7779_cpg_clocks_init(struct device_node *np) const char *name; struct clk *clk; - of_property_read_string_index(np, "clock-output-names", i, - &name); + if (of_property_read_string_index(np, "clock-output-names", i, + &name)) + pr_err("%s: can't get clock-output-names (%d)\n", + __func__, i); clk = r8a7779_cpg_register_clock(np, cpg, config, plla_mult, name);