From patchwork Fri Jun 17 18:10:03 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: weiyj_lk@163.com X-Patchwork-Id: 9184761 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 30B47608A2 for ; Fri, 17 Jun 2016 18:10:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 133CB283AB for ; Fri, 17 Jun 2016 18:10:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 05AA32837E; Fri, 17 Jun 2016 18:10:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AE1572837E for ; Fri, 17 Jun 2016 18:10:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752337AbcFQSKp (ORCPT ); Fri, 17 Jun 2016 14:10:45 -0400 Received: from m12-13.163.com ([220.181.12.13]:40471 "EHLO m12-13.163.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751577AbcFQSKo (ORCPT ); Fri, 17 Jun 2016 14:10:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id:MIME-Version; bh=e+DSj 3aeeHCsohxGxXIhS+RHijSnkPOmYb7zCbhnssY=; b=hRAoU1/JLmf36eDL4tRCM gUhAI7KWkbuQEZvUBNO8gzkfulg0vF8ldQNmBR26NUkbSzTicmXxQntleX/r40nk VjpgfZXu9ci9HPIy9IZGhvqvZrP9fUx4rTCG6T1opPp/v/A3Brn2GeTllvVPC8NR f4LlrDgNTMiBfARsAjQITo= Received: from localhost.localdomain.localdomain (unknown [117.36.101.242]) by smtp9 (Coremail) with SMTP id DcCowAC3pP38PGRXPpK+AA--.618S3; Sat, 18 Jun 2016 02:10:05 +0800 (CST) From: weiyj_lk@163.com To: Chanwoo Choi , MyungJoo Ham , Kyungmin Park , Kukjin Kim , Krzysztof Kozlowski Cc: Wei Yongjun , linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org Subject: [PATCH -next] PM / devfreq: event: Fix return value check in exynos_nocp_parse_dt() Date: Fri, 17 Jun 2016 18:10:03 +0000 Message-Id: <1466187003-19823-1-git-send-email-weiyj_lk@163.com> X-Mailer: git-send-email 2.5.5 MIME-Version: 1.0 X-CM-TRANSID: DcCowAC3pP38PGRXPpK+AA--.618S3 X-Coremail-Antispam: 1Uf129KBjvdXoW7Wr4DZF4rCFyDJF1DCw1Dtrb_yoWDWrX_CF W7CFsrXryF9w1qgayUCr43AryayFnIgr93GF4aga4aqFW7Xw4UC3yxZry8ArZrWws8Jr9F vF9I9r4Ivr1jvjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7IU5nVy7UUUUU== X-Originating-IP: [117.36.101.242] X-CM-SenderInfo: pzhl5yxbonqiywtou0bp/1tbiMB2L1lWBWnGAhQAAsK Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Wei Yongjun In case of error, the function platform_get_resource() returns NULL pointer not ERR_PTR(). Remove unneeded error handling on the result of a call to platform_get_resource() since the value is passed to devm_ioremap_resource(). Signed-off-by: Wei Yongjun --- drivers/devfreq/event/exynos-nocp.c | 3 --- 1 file changed, 3 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-pm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/devfreq/event/exynos-nocp.c b/drivers/devfreq/event/exynos-nocp.c index 6b6a5f3..a584140 100644 --- a/drivers/devfreq/event/exynos-nocp.c +++ b/drivers/devfreq/event/exynos-nocp.c @@ -220,9 +220,6 @@ static int exynos_nocp_parse_dt(struct platform_device *pdev, /* Maps the memory mapped IO to control nocp register */ res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (IS_ERR(res)) - return PTR_ERR(res); - base = devm_ioremap_resource(dev, res); if (IS_ERR(base)) return PTR_ERR(base);