From patchwork Fri Nov 8 10:01:09 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 3157101 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id C354CBEEB2 for ; Fri, 8 Nov 2013 10:01:34 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C0741201CD for ; Fri, 8 Nov 2013 10:01:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2A888201CB for ; Fri, 8 Nov 2013 10:01:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752856Ab3KHKB1 (ORCPT ); Fri, 8 Nov 2013 05:01:27 -0500 Received: from userp1040.oracle.com ([156.151.31.81]:37093 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751341Ab3KHKBZ (ORCPT ); Fri, 8 Nov 2013 05:01:25 -0500 Received: from ucsinet21.oracle.com (ucsinet21.oracle.com [156.151.31.93]) by userp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id rA8A1HCs021359 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 8 Nov 2013 10:01:18 GMT Received: from userz7021.oracle.com (userz7021.oracle.com [156.151.31.85]) by ucsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id rA8A1GRB020833 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 8 Nov 2013 10:01:17 GMT Received: from abhmp0009.oracle.com (abhmp0009.oracle.com [141.146.116.15]) by userz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id rA8A1F59020780; Fri, 8 Nov 2013 10:01:15 GMT Received: from elgon.mountain (/41.202.233.179) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 08 Nov 2013 02:01:15 -0800 Date: Fri, 8 Nov 2013 13:01:09 +0300 From: Dan Carpenter To: Mauro Carvalho Chehab Cc: Grant Likely , Rob Herring , Archit Taneja , Hans Verkuil , Kamil Debski , linux-media@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [patch] [media] v4l: ti-vpe: checking for IS_ERR() instead of NULL Message-ID: <20131108100109.GN27977@elgon.mountain> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-Source-IP: ucsinet21.oracle.com [156.151.31.93] Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 devm_ioremap() returns NULL on error, it doesn't return an ERR_PTR. Signed-off-by: Dan Carpenter --- To unsubscribe from this list: send the line "unsubscribe linux-media" 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/media/platform/ti-vpe/vpe.c b/drivers/media/platform/ti-vpe/vpe.c index 4e58069..e163466 100644 --- a/drivers/media/platform/ti-vpe/vpe.c +++ b/drivers/media/platform/ti-vpe/vpe.c @@ -1962,8 +1962,8 @@ static int vpe_probe(struct platform_device *pdev) * registers based on the sub block base addresses */ dev->base = devm_ioremap(&pdev->dev, res->start, SZ_32K); - if (IS_ERR(dev->base)) { - ret = PTR_ERR(dev->base); + if (!dev->base) { + ret = -ENOMEM; goto v4l2_dev_unreg; }