From patchwork Thu May 13 13:46:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhen Lei X-Patchwork-Id: 437332 Delivered-To: patch@linaro.org Received: by 2002:a02:c901:0:0:0:0:0 with SMTP id t1csp345718jao; Thu, 13 May 2021 06:47:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyAgCOMM7ixygo1Sple3TBQQQUhJXmeAOm2pcg0xWtW0bJejFmtaGmY5Xyjm6et5kItACG3 X-Received: by 2002:a17:90a:4588:: with SMTP id v8mr5157737pjg.195.1620913626397; Thu, 13 May 2021 06:47:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620913626; cv=none; d=google.com; s=arc-20160816; b=mSomDdcx0TayQHbbrEQ/WlgKc1gNJLOkzGdTrAjjjYz7XWUvXUdYEopV3/qTjP0MvK hATieB192HZ8BgIH+wT7wE6idlOgsWXRjkAEhD8MwoQqGCNG86fjFGn0QyVlC/AMnteK FSeJQNoKyAADEuc2ThYSpJzCrfRHrLms/gUKezO2QYnsP8QYBBqe9xmDUkTKG8OTTvvm HHJ73TcNHsQKzYoVTeQsB+QkcsLS/n3cQ1VRyxu7SsXcyt3n1sAE4lsXn0vKjbW4lzwz 8vUbUlw4iMR+jjTf8y4Bq3/syZoix/nLMrQnSb2EOv8mLUj/h0oRoVkLa+jV0yVRxQvX 9IPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:to:from:delivered-to; bh=IhU1GsBTjRNm8iaXy9ML9243vfzNPBwuUGmrA7u6SA4=; b=HJnkCBTSXle6QhejyuOtbVcyJAPKXxydfSODWTZFpBgtyf96NK16fDqBf0pBMbPHJ6 2jW4rpsbDPH1XmGzMypa88TAScaSgrGOexNaBgVNWHPQv1jTWVF2GEuyEyQQpP9ayEtg ehAwDo8jpNYkzlUBHRBIuw6KPJ5c3jfcP1WzYZo0mFttFc8Sq76AIEQf5quKqcIAsqXT M3KXWPplrZXAsVk2bkxWafzoDB/QGqyATUd7GmM0HV6Xku/7xZtDyCVC6vl13d/i28Au AypEgEHdqUKYGY5f79qKvUKL1zviwdGPu+6QcEcZc4C4ExE+A5LJA5CxwGUCT1+AnwsF gqqQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [2610:10:20:722:a800:ff:fe36:1795]) by mx.google.com with ESMTPS id x9si4206138pgp.386.2021.05.13.06.47.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 May 2021 06:47:06 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) client-ip=2610:10:20:722:a800:ff:fe36:1795; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id ED8006E88E; Thu, 13 May 2021 13:47:02 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from szxga06-in.huawei.com (szxga06-in.huawei.com [45.249.212.32]) by gabe.freedesktop.org (Postfix) with ESMTPS id C43436E88E for ; Thu, 13 May 2021 13:47:01 +0000 (UTC) Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.58]) by szxga06-in.huawei.com (SkyGuard) with ESMTP id 4FgtFB4p9dzmVbn; Thu, 13 May 2021 21:44:46 +0800 (CST) Received: from thunder-town.china.huawei.com (10.174.177.72) by DGGEMS402-HUB.china.huawei.com (10.3.19.202) with Microsoft SMTP Server id 14.3.498.0; Thu, 13 May 2021 21:46:50 +0800 From: Zhen Lei To: Anitha Chrisanthus , Edmund Dea , David Airlie , Daniel Vetter , Sam Ravnborg , dri-devel Subject: [PATCH 1/1] drm/kmb: Fix error return code in kmb_hw_init() Date: Thu, 13 May 2021 21:46:38 +0800 Message-ID: <20210513134639.6541-1-thunder.leizhen@huawei.com> X-Mailer: git-send-email 2.26.0.windows.1 MIME-Version: 1.0 X-Originating-IP: [10.174.177.72] X-CFilter-Loop: Reflected X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Zhen Lei Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" When call platform_get_irq() to obtain the IRQ of the lcd fails, the returned error code should be propagated. However, we currently do not explicitly assign this error code to 'ret'. As a result, 0 was incorrectly returned. Fixes: 7f7b96a8a0a1 ("drm/kmb: Add support for KeemBay Display") Reported-by: Hulk Robot Signed-off-by: Zhen Lei --- drivers/gpu/drm/kmb/kmb_drv.c | 1 + 1 file changed, 1 insertion(+) -- 2.26.0.106.g9fadedd Reviewed-by: Anitha Chrisanthus diff --git a/drivers/gpu/drm/kmb/kmb_drv.c b/drivers/gpu/drm/kmb/kmb_drv.c index f64e06e1067dd8d..96ea1a2c11dd6a3 100644 --- a/drivers/gpu/drm/kmb/kmb_drv.c +++ b/drivers/gpu/drm/kmb/kmb_drv.c @@ -137,6 +137,7 @@ static int kmb_hw_init(struct drm_device *drm, unsigned long flags) /* Allocate LCD interrupt resources */ irq_lcd = platform_get_irq(pdev, 0); if (irq_lcd < 0) { + ret = irq_lcd; drm_err(&kmb->drm, "irq_lcd not found"); goto setup_fail; }