From patchwork Tue Mar 21 08:13:58 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thierry Reding X-Patchwork-Id: 9636187 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 90854602CC for ; Tue, 21 Mar 2017 08:14:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 809B91FF8F for ; Tue, 21 Mar 2017 08:14:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 755A827F07; Tue, 21 Mar 2017 08:14:53 +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 4377C1FF8F for ; Tue, 21 Mar 2017 08:14:53 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id DA3616E304; Tue, 21 Mar 2017 08:14:15 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-wr0-x242.google.com (mail-wr0-x242.google.com [IPv6:2a00:1450:400c:c0c::242]) by gabe.freedesktop.org (Postfix) with ESMTPS id C81C46E303; Tue, 21 Mar 2017 08:14:13 +0000 (UTC) Received: by mail-wr0-x242.google.com with SMTP id u108so21386626wrb.2; Tue, 21 Mar 2017 01:14:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ERuJUfp6zOQ5NsVGu9R3cb2ifsWqkKmLhPpqSIa6Hn8=; b=PirShkc2tHxeIG3HaLnmsnWGYW7Rxq7DRNqZZTF7G3SwAPpO9wT1ZnYoN55tGKuEkc atLwrT8vxcBgV/Haxjatu2xWH8Q7qyKy/7F9tGsendAKx0PW73/KMvkJF7wUmMzRdinw O5kQYoUHVZKNFVG0M7lxL5NLPNXMSQADe1fRovY8AkNZrCncIi7WTAYME54detxjkXdh TwBwo/sL76geJZUByn3oiIMqaLGpKDGKJEVo2F7cWTEO8ObHGqv6GQVNgrxhoZStoTYj WzfZYRy9e/YBrlIJ8ZKNSPVYwfZJ3rM4tunQQTRheaBJC5U0MjnvM9cozYZ3uVk8B0Gn Rn3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=ERuJUfp6zOQ5NsVGu9R3cb2ifsWqkKmLhPpqSIa6Hn8=; b=QmW+W4xw/lQdvFTFubE04Wp0R5MPWV6VekloZe6u/xoWY6B8X3h2gdn7oWSAsNKkw9 Q4kQJmxm7mzJBbnggFAKShQvivNBlbmWvyKOqiRmS2iu4R4Fg+Sr5R1rSEgXXEQq3TYH 7HwZP7ZamHgl6p9lu2SOjM3CEk2Gde3f30WdwrujbcdobZ+IqdCLzTNN8slsIzSWv4TG aQANZXZ11PvNxeBp0qhJ7krTSYR7h1Ap9atQbybUsNvIWIa5tAW21afKVIm/ldg13JIU q6DLla/DeERd95aVwiRa8HKbznu2wWeoGULyY1dIbSjeRcGJaDxmqUZq2EkWfBf5R/s3 UU0w== X-Gm-Message-State: AFeK/H16cLGHhQyFYQT+ycSz34S8QUstu05LZh0ma4JgU/sVFFn4FggLg6HNnv1fiSmfBA== X-Received: by 10.223.136.213 with SMTP id g21mr29187364wrg.189.1490084052404; Tue, 21 Mar 2017 01:14:12 -0700 (PDT) Received: from localhost (port-52488.pppoe.wtnet.de. [46.59.205.174]) by smtp.gmail.com with ESMTPSA id o31sm23976071wrc.27.2017.03.21.01.14.11 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 21 Mar 2017 01:14:11 -0700 (PDT) From: Thierry Reding To: Daniel Vetter Date: Tue, 21 Mar 2017 09:13:58 +0100 Message-Id: <20170321081358.27237-11-thierry.reding@gmail.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20170321081358.27237-1-thierry.reding@gmail.com> References: <20170321081358.27237-1-thierry.reding@gmail.com> Cc: John Stultz , intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org Subject: [Intel-gfx] [PATCH v3 10/10] drm/rockchip: Remove unnecessary NULL check X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP From: Thierry Reding The expression &private->fbdev_helper can never be NULL, so the check is completely unnecessary. Signed-off-by: Thierry Reding Reviewed-by: Daniel Vetter --- drivers/gpu/drm/rockchip/rockchip_drm_fb.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_fb.c b/drivers/gpu/drm/rockchip/rockchip_drm_fb.c index 81f9548672b0..df6bceabeca8 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_fb.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_fb.c @@ -168,10 +168,8 @@ rockchip_user_fb_create(struct drm_device *dev, struct drm_file *file_priv, static void rockchip_drm_output_poll_changed(struct drm_device *dev) { struct rockchip_drm_private *private = dev->dev_private; - struct drm_fb_helper *fb_helper = &private->fbdev_helper; - if (fb_helper) - drm_fb_helper_hotplug_event(fb_helper); + drm_fb_helper_hotplug_event(&private->fbdev_helper); } static void