From patchwork Sat Sep 17 15:53:54 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 9340915 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 EC8B16077A for ; Tue, 20 Sep 2016 02:44:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DAA5B28FF9 for ; Tue, 20 Sep 2016 02:44:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CEEAA29B7E; Tue, 20 Sep 2016 02:44:59 +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=-4.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 39A3728FF9 for ; Tue, 20 Sep 2016 02:44:59 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8968E6E5FE; Tue, 20 Sep 2016 02:43:37 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pa0-x241.google.com (mail-pa0-x241.google.com [IPv6:2607:f8b0:400e:c03::241]) by gabe.freedesktop.org (Postfix) with ESMTPS id 55AEB6E021 for ; Sat, 17 Sep 2016 15:54:02 +0000 (UTC) Received: by mail-pa0-x241.google.com with SMTP id my20so1778364pab.3 for ; Sat, 17 Sep 2016 08:54:02 -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:mime-version :content-transfer-encoding; bh=0MX47QZob7NT8EKAcblfx0RJW5kcmzQiS7mZbiSEiPo=; b=KHtu06tcnjg+L317DXhrd5l5ckpVNXHk44o2rXnLx51ke5pW7lwwBEZ37T8sdP2NVb uYIuASDUD04GnlE/MGLS20UHkZK8gDJ0ZMRDHQ/ybMjIb0LMA63U64DlvpAnf0ZtUJ0M FTURE1LVwYTAN4t8oUWCXWybntb3m6yCIvVuTwSIlH25GiM6BZKsCnlAt26h7DwC0+lb ghmgmb3n2+spIlfi/hx4sMbAjy85XNU8IdYxNgBx68KK86m4nGhtGKLT28YFSGw5c91a sk/u6clQsUH3d1RJsb3X0hdLOtEMaKvPi1XVAPHMBu1bfIR/kOaQqMAbotRwsHZ8MMDm MOTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=0MX47QZob7NT8EKAcblfx0RJW5kcmzQiS7mZbiSEiPo=; b=CfzbDJIzP2B96xgJE75fIysON2RrQDs5F+8Ra+PtTK/Xut06xkihpmmgQsgipJPSuA fFrlehNeJB8gmdKnIOK6zsIVA4wpN/lS4QKhNtA+b1Uls9hAtvMYiN6oNZbEx6bqAH1U zvmKBbhcB7WLTxzgTVPtypXJAtWMeqjfoEnD3X70Xk0ffzgxg50QF7w/kM5/ES6qbnhY J3miTjBXxP2BjRPrQA9Dq5QWZzFKai4Ov/pUpIGtDg9wb8az9RxrvhhHLotuUkQUCWhA 9qUQ43zn1JIZmUsUpiyXl2bAmFkaZ20FYbLurlR4t/NpLsEY2wzTnZOQyI1QkxUkVdp7 ejlg== X-Gm-Message-State: AE9vXwM0Jj4ykHxxWhMH/bMnDW7h7Wu7Ib4i14OHxnFukT1FyNlTYq0LWWZdqBE4PUrMLQ== X-Received: by 10.66.89.72 with SMTP id bm8mr30056154pab.1.1474127641169; Sat, 17 Sep 2016 08:54:01 -0700 (PDT) Received: from 192.168.0.37 (ec2-52-192-197-227.ap-northeast-1.compute.amazonaws.com. [52.192.197.227]) by smtp.gmail.com with ESMTPSA id o5sm60060315pfb.9.2016.09.17.08.53.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 17 Sep 2016 08:54:00 -0700 (PDT) From: Wei Yongjun To: Tomi Valkeinen , David Airlie , Peter Ujfalusi , Dave Airlie Subject: [PATCH] drm/omap: fix return value check in dsi_bind() Date: Sat, 17 Sep 2016 15:53:54 +0000 Message-Id: <1474127634-14436-1-git-send-email-weiyj.lk@gmail.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-Mailman-Approved-At: Tue, 20 Sep 2016 02:42:21 +0000 Cc: Wei Yongjun , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Wei Yongjun Fix the retrn value check which testing the wrong variable in dsi_bind(). Signed-off-by: Wei Yongjun Reviewed-by: Peter Ujfalusi --- drivers/gpu/drm/omapdrm/dss/dsi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/omapdrm/dss/dsi.c b/drivers/gpu/drm/omapdrm/dss/dsi.c index e1be5e7..a567ebd 100644 --- a/drivers/gpu/drm/omapdrm/dss/dsi.c +++ b/drivers/gpu/drm/omapdrm/dss/dsi.c @@ -5342,7 +5342,7 @@ static int dsi_bind(struct device *dev, struct device *master, void *data) dsi->phy_base = devm_ioremap(&dsidev->dev, res->start, resource_size(res)); - if (!dsi->proto_base) { + if (!dsi->phy_base) { DSSERR("can't ioremap DSI PHY\n"); return -ENOMEM; } @@ -5362,7 +5362,7 @@ static int dsi_bind(struct device *dev, struct device *master, void *data) dsi->pll_base = devm_ioremap(&dsidev->dev, res->start, resource_size(res)); - if (!dsi->proto_base) { + if (!dsi->pll_base) { DSSERR("can't ioremap DSI PLL\n"); return -ENOMEM; }