From patchwork Sat Jul 20 18:48:49 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 2830845 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id B25FC9F4D5 for ; Sat, 20 Jul 2013 18:49:17 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DC3FD2012E for ; Sat, 20 Jul 2013 18:49:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D1FD620151 for ; Sat, 20 Jul 2013 18:49:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754777Ab3GTStL (ORCPT ); Sat, 20 Jul 2013 14:49:11 -0400 Received: from mail-gg0-f173.google.com ([209.85.161.173]:50733 "EHLO mail-gg0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754723Ab3GTStJ (ORCPT ); Sat, 20 Jul 2013 14:49:09 -0400 Received: by mail-gg0-f173.google.com with SMTP id k3so1627411ggn.18 for ; Sat, 20 Jul 2013 11:49:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=jeuOq8Ra4Ar6Sahh8b1t9EV6mOq+VyDIqQcyGTJvcwA=; b=J6atmlUMSuphlwGT1Xwdm4SU0+43Oz9uz8U2L1FgF9iGd6YYuxVmRVhohwTi5Lum4B 8ytKU6SkqDlwLw3jAlPjimMzdjxWqRr9R7GYyoRGrYP/A3JE905TcoUa4pkabxLZGjWC I8Wnc49bLmrfYlGrsG+Ysl11wlz6j6PlZyCkvghdsKuORryVosVkk+YzHtCUaaYsB2go zWHudPHvN1SBescQp4AGMEH5GF+moi1tPHkSW01aKoOl7mHilViEIEocW9LQQAaaRJC3 iaik5LdtuVzJ/wHuFLK87PkZXyp0ZtuRyUCAIYyBY/WW2pnbx491QB5tobmtCQsGeZo9 ouzg== X-Received: by 10.236.123.210 with SMTP id v58mr11364920yhh.64.1374346148747; Sat, 20 Jul 2013 11:49:08 -0700 (PDT) Received: from localhost.localdomain ([189.5.19.145]) by mx.google.com with ESMTPSA id v68sm29205765yhn.22.2013.07.20.11.49.07 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 20 Jul 2013 11:49:08 -0700 (PDT) From: Fabio Estevam To: k.debski@samsung.com Cc: m.chehab@samsung.com, kernel@pengutronix.de, linux-media@vger.kernel.org, Fabio Estevam Subject: [PATCH 2/2] [media] coda: No need to check the return value of platform_get_resource() Date: Sat, 20 Jul 2013 15:48:49 -0300 Message-Id: <1374346129-12907-2-git-send-email-festevam@gmail.com> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1374346129-12907-1-git-send-email-festevam@gmail.com> References: <1374346129-12907-1-git-send-email-festevam@gmail.com> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, 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: Fabio Estevam When using devm_ioremap_resource(), we do not need to check the return value of platform_get_resource(), so just remove it. Signed-off-by: Fabio Estevam Acked-by: Philipp Zabel --- drivers/media/platform/coda.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/media/platform/coda.c b/drivers/media/platform/coda.c index dd76228..236385f 100644 --- a/drivers/media/platform/coda.c +++ b/drivers/media/platform/coda.c @@ -2038,11 +2038,6 @@ static int coda_probe(struct platform_device *pdev) /* Get memory for physical registers */ res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (res == NULL) { - dev_err(&pdev->dev, "failed to get memory region resource\n"); - return -ENOENT; - } - dev->regs_base = devm_ioremap_resource(&pdev->dev, res); if (IS_ERR(dev->regs_base)) return PTR_ERR(dev->regs_base);