From patchwork Wed Aug 21 15:14:18 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 2847827 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 B2AD49F239 for ; Wed, 21 Aug 2013 15:14:40 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1B2B520399 for ; Wed, 21 Aug 2013 15:14:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9DCA6204A2 for ; Wed, 21 Aug 2013 15:14:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751843Ab3HUPOa (ORCPT ); Wed, 21 Aug 2013 11:14:30 -0400 Received: from mail-yh0-f47.google.com ([209.85.213.47]:58182 "EHLO mail-yh0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751779Ab3HUPOa (ORCPT ); Wed, 21 Aug 2013 11:14:30 -0400 Received: by mail-yh0-f47.google.com with SMTP id 29so129852yhl.34 for ; Wed, 21 Aug 2013 08:14:29 -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:in-reply-to:references; bh=likhvepmzFlCuJ+AOi+uPmgBgngUU8IFO4TWx7DAvkw=; b=TS9YzUIorN9FHn9NRSPsbG8AH4t/OFlAcF42rhehYdqaJE7KS738CtioFD/MMMtJej +cxxsgGzrWh/Bwobohzi0RQkCTigDOyuE3RNcQylv0VveOw8YTZJEn1Z2J6qxZJYPb56 r3WwckIjZEqb+NygqVRDD+Qw7z6dcVYY5DgAH+UdjveeCXwnZMOfXEYDwBzIs/rlDtXx X8LmBdRC3adHfZvx/wcFqpU5FkzQi9HAEjUW929RwCkiSV4N1GCLuAasejyY2dYMQIxO rWC5fj6hNueW55K9K/ra+JZY0HyDTp+WQkcaBeTAQo+Gj8rJTYo9L6yZdjhMhASOkHvk gZTQ== X-Received: by 10.236.60.137 with SMTP id u9mr1609461yhc.71.1377098069514; Wed, 21 Aug 2013 08:14:29 -0700 (PDT) Received: from localhost.localdomain ([177.194.45.238]) by mx.google.com with ESMTPSA id v22sm8284836yhn.12.1969.12.31.16.00.00 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 21 Aug 2013 08:14:29 -0700 (PDT) From: Fabio Estevam To: k.debski@samsung.com Cc: p.zabel@pengutronix.de, linux-media@vger.kernel.org, Fabio Estevam Subject: [PATCH v7 3/3] [media] coda: No need to check the return value of platform_get_resource() Date: Wed, 21 Aug 2013 12:14:18 -0300 Message-Id: <1377098058-12566-3-git-send-email-festevam@gmail.com> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1377098058-12566-1-git-send-email-festevam@gmail.com> References: <1377098058-12566-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=-9.6 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 --- Changes since v6: - Rebased against correct branch 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 04ced56..999f9dc 100644 --- a/drivers/media/platform/coda.c +++ b/drivers/media/platform/coda.c @@ -3154,11 +3154,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);