Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp1117768pxx; Fri, 30 Oct 2020 02:28:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwAvVAnztarMiZ/0qByX4scxrn7ud4WWbjuNxvjiqZOzOgEh0y/Recakf4RtnIMUd0mDR3W X-Received: by 2002:aa7:cb8f:: with SMTP id r15mr1289301edt.356.1604050125571; Fri, 30 Oct 2020 02:28:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1604050125; cv=none; d=google.com; s=arc-20160816; b=ZCO4j7d5GBT8wSzbFFGftnH+QxRBnTTWkmFqb89jxWzoHQXfkQuBpw/U+g0p5mPbRE tczCtH21GoXOgXfUUNZYvfBvfb8RRFhwdW0VY/juTgn+koh+aCFA4M0X/Hek5RyiOvbt OrB0Wat3oJdyqz2KpRvdUhzoLXrsS92Epd/4hpafTvrcAPJelRPyxvpFRxbdmpI8HH5k bj3p2IW24wAsykWKxWzZ01e4YNs1GzclG+8cmXkh3bIctKwtweq1TZFhrf4EiM4JtkFV NdAXRwnfcM3UyrH5UYRnTju8xdpZiPyVHRXt+A9C6qxaQX933Feq2i4imhUTI6TvFqwn 7uHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:to:from; bh=B/Xdcan0jj7bABPim2QRXxZu1f6bNpw2aXkVAfpUFVU=; b=eiu7e/Ov2Bk/4E/4octYYF80j2aN104FmplJTYZcX345po6wFdVKAdK7l27b5lgYyg f9WVRYDLuA4Evv5HLqbvF6KzU6x5NUsUSIfg+PKhFE7NbCHfrBr0WXYUUiV7R9J5gQ5R vdOUorjPUqHVySXg80yVjrk5b+A9oQtcCoB4OCZ3YXylFz9z7sHbKQK+HWZ13TMEeyoj WwaC5qdQF9O75Mqvlg6j0Gkiis/8uiofE0WyJEkmvlbuqqOyYlH5kdbV8tOoWu1VWHK3 aRzjgRLviPLyfhtkPenBTVYAKOqm/Cqi32Z/Gs2tatZBoGBums0SXmzsOe86L3yByk0y RpVA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d21si3899716edu.380.2020.10.30.02.28.23; Fri, 30 Oct 2020 02:28:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726199AbgJ3J0z (ORCPT + 99 others); Fri, 30 Oct 2020 05:26:55 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:7106 "EHLO szxga05-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725790AbgJ3J0z (ORCPT ); Fri, 30 Oct 2020 05:26:55 -0400 Received: from DGGEMS408-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4CMxld1bvzzLnSy; Fri, 30 Oct 2020 17:26:53 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by DGGEMS408-HUB.china.huawei.com (10.3.19.208) with Microsoft SMTP Server id 14.3.487.0; Fri, 30 Oct 2020 17:26:48 +0800 From: Tian Tao To: , , , , , , , , Subject: [PATCH] drm/hisilicon: Remove redundant null check Date: Fri, 30 Oct 2020 17:27:26 +0800 Message-ID: <1604050046-64539-1-git-send-email-tiantao6@hisilicon.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.69.192.56] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org drm_irq_uninstall can handle the case where dev->irq_enable is false, so Remove redundant null check. Signed-off-by: Tian Tao --- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c index 0c1b40d..b71589b1 100644 --- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c +++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c @@ -246,13 +246,13 @@ static int hibmc_unload(struct drm_device *dev) drm_atomic_helper_shutdown(dev); - if (dev->irq_enabled) - drm_irq_uninstall(dev); - + drm_irq_uninstall(dev); pci_disable_msi(dev->pdev); + hibmc_kms_fini(priv); hibmc_mm_fini(priv); dev->dev_private = NULL; + return 0; } -- 2.7.4