From patchwork Sun Oct 16 08:01:47 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 9378053 X-Patchwork-Delegate: geert@linux-m68k.org 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 3D7E5600CA for ; Sun, 16 Oct 2016 08:02:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 24FB928D98 for ; Sun, 16 Oct 2016 08:02:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 17E6428DED; Sun, 16 Oct 2016 08:02:16 +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=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6940E28D98 for ; Sun, 16 Oct 2016 08:02:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751494AbcJPICO (ORCPT ); Sun, 16 Oct 2016 04:02:14 -0400 Received: from sauhun.de ([89.238.76.85]:39007 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750861AbcJPICN (ORCPT ); Sun, 16 Oct 2016 04:02:13 -0400 Received: from p5b385e04.dip0.t-ipconnect.de ([91.56.94.4]:48534 helo=localhost) by pokefinder.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1bvgOL-0001Al-Qc; Sun, 16 Oct 2016 10:01:58 +0200 From: Wolfram Sang To: dri-devel@lists.freedesktop.org Cc: linux-renesas-soc@vger.kernel.org, Laurent Pinchart , Daniel Vetter , Wolfram Sang , Geert Uytterhoeven Subject: [PATCH RESEND] gpu: drm: rcar-du: rcar_du_drv: don't open code of_device_get_match_data() Date: Sun, 16 Oct 2016 10:01:47 +0200 Message-Id: <20161016080147.2215-1-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.9.3 Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This change will also make Coverity happy by avoiding a theoretical NULL pointer dereference; yet another reason is to use the above helper function to tighten the code and make it more readable. Signed-off-by: Wolfram Sang Acked-by: Geert Uytterhoeven --- Found this in one of my old branches. Plain resend, only ack from Geert added. drivers/gpu/drm/rcar-du/rcar_du_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/rcar-du/rcar_du_drv.c b/drivers/gpu/drm/rcar-du/rcar_du_drv.c index 73c971e39b1c72..50755f2f2bd3e4 100644 --- a/drivers/gpu/drm/rcar-du/rcar_du_drv.c +++ b/drivers/gpu/drm/rcar-du/rcar_du_drv.c @@ -313,7 +313,7 @@ static int rcar_du_probe(struct platform_device *pdev) init_waitqueue_head(&rcdu->commit.wait); rcdu->dev = &pdev->dev; - rcdu->info = of_match_device(rcar_du_of_table, rcdu->dev)->data; + rcdu->info = of_device_get_match_data(rcdu->dev); ddev = drm_dev_alloc(&rcar_du_driver, &pdev->dev); if (IS_ERR(ddev))