From patchwork Sat Jul 20 19:10:41 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 2830847 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 7E07F9F4D4 for ; Sat, 20 Jul 2013 19:11:50 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A1D5620150 for ; Sat, 20 Jul 2013 19:11:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C1DF52014C for ; Sat, 20 Jul 2013 19:11:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754484Ab3GTTLN (ORCPT ); Sat, 20 Jul 2013 15:11:13 -0400 Received: from mail-gh0-f179.google.com ([209.85.160.179]:57955 "EHLO mail-gh0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754743Ab3GTTKy (ORCPT ); Sat, 20 Jul 2013 15:10:54 -0400 Received: by mail-gh0-f179.google.com with SMTP id f16so1667897ghb.38 for ; Sat, 20 Jul 2013 12:10:53 -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=lHTZm2h9cwwgjh/oYH82L/j5VtT0/f18FVv0WZH3GfE=; b=hiJlaLFo7AoFd6OyJ2oskti4U+IEFG7tLhRbYSQhUBCCePHTGfaj/Amf3etc4zLEXE +zGbFmI52eNBB8ObDHTxCOpLdWlGkL5aghTaqwCDqmGDdVlNY6QsPKxdVK9P3iWA/B98 TlrJS9cSInzxjkQlvgjGwj6dT2AkxJYdbugNwJJSQ3IKkIqMQxTQwj+dNQJ3sbOD4Xx+ yYHqX6tq5gLhhBhWQaCXC4b5+NJlGqfIGC4rcrMMpacR2dIdCF8WXytK+9BbTZ8RBE3f gc/OgcJIJoIgpKxg7DeEXY2BjYGxjpaiR/Wrbmb17QUWgX2RRH8T96lumDhLPb17fALs /53Q== X-Received: by 10.236.27.234 with SMTP id e70mr11175365yha.15.1374347453523; Sat, 20 Jul 2013 12:10:53 -0700 (PDT) Received: from localhost.localdomain ([189.5.19.145]) by mx.google.com with ESMTPSA id u25sm28524839yhl.23.2013.07.20.12.10.51 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 20 Jul 2013 12:10:53 -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 16:10:41 -0300 Message-Id: <1374347441-15662-2-git-send-email-festevam@gmail.com> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1374347441-15662-1-git-send-email-festevam@gmail.com> References: <1374347441-15662-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 --- Changes since v1: - None 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 486db30..f9a4b33 100644 --- a/drivers/media/platform/coda.c +++ b/drivers/media/platform/coda.c @@ -2039,11 +2039,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);