From patchwork Wed Jun 12 13:30:38 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 10990049 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id AED6D1395 for ; Wed, 12 Jun 2019 13:30:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9BD9322A68 for ; Wed, 12 Jun 2019 13:30:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8AF202887B; Wed, 12 Jun 2019 13:30:48 +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=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED 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 3995F212DB for ; Wed, 12 Jun 2019 13:30:48 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 84E148909C; Wed, 12 Jun 2019 13:30:47 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lj1-x241.google.com (mail-lj1-x241.google.com [IPv6:2a00:1450:4864:20::241]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7D6838909C for ; Wed, 12 Jun 2019 13:30:45 +0000 (UTC) Received: by mail-lj1-x241.google.com with SMTP id a21so15116373ljh.7 for ; Wed, 12 Jun 2019 06:30:45 -0700 (PDT) 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:mime-version :content-transfer-encoding; bh=zOJC9llcXSmmT03g3kIZ1KIg2eqxtvX5nA/fmUTxK9s=; b=Cg1CQg4+95wafZj8mKwIR5HU2OTS37wq60UwgHmDcKsP8OdMwyuh07/hLn+43LVIaq zb06Ae4hRyIwzPMSwDyp9Ca3LTv4LqKssFcx9+Znx1BmVKyrE2zjvIU8gv5o39fIgwd1 CCrGX3qSAS8/i5qwaUXvPAwkrFpt+COQxCJFIribxgT8RhdVmM7YRvMrI1jyAAv2Ka/L Dne9710kPIjXb28mRY5FwHoOYbV3IRGRpSM0Kt+lCaAZRxWt3OLWWnj/2/fp14i4Za9K jQKRG+sEcigtJ9Glpj7LrDjhQtsKzdm6IWkJkajRX4QhznDQlZqqhbYldpdqBhDFOSkW VCpQ== X-Gm-Message-State: APjAAAXMygwvAokF9gF1LmXMym+E5veJU+gu44HMmVNoAXVyc0I/+f9E IBs2BvwxiwvUlvHwSWFuJgHY5We3v4I= X-Google-Smtp-Source: APXvYqwX6KxgL33+MY/QH9VsU3hPzaj5iVpor7Fy2bFkBvnkwyJisL6ZNoC76MU1vXUBK45OUO6IJQ== X-Received: by 2002:a2e:894a:: with SMTP id b10mr12543185ljk.99.1560346243732; Wed, 12 Jun 2019 06:30:43 -0700 (PDT) Received: from genomnajs.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id w1sm3923261ljm.81.2019.06.12.06.30.42 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 12 Jun 2019 06:30:42 -0700 (PDT) From: Linus Walleij To: dri-devel@lists.freedesktop.org, Maarten Lankhorst , Maxime Ripard , Sean Paul Subject: [PATCH] drm/mcde: Fix uninitialized variable Date: Wed, 12 Jun 2019 15:30:38 +0200 Message-Id: <20190612133038.5522-1-linus.walleij@linaro.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=zOJC9llcXSmmT03g3kIZ1KIg2eqxtvX5nA/fmUTxK9s=; b=rAEPeMUC7ZuZ7okUYsti/xIXf6d6flBHRMfTsFDmmOZEUfVJ4UiZDK4KDWJuvY8D/r p8noSLNhV6qd7pNWG/zMW7TEdOI3sonyLu9h5I0PccbsZsVw5bemsnky9K2PTLF65BHA EJtnoYBJsSvk2YSG1G0NpuEvnlm+oWyl4q/hTQqKXzWJIl1JoSEa7iffC8TodKtbv9ZC ZeKQOs21741JBOGTjLslQxx/Hm2/4uxc70tKAxdpdZ08k608tNvKeriV+7U98A2m7smw ML1rhsHfpGwPxSGZcgtgnzTLkusUWdE3kWkpjVxGLS6XSSUzyr7GHE+cKvA8dOha7RJP 0kRw== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Dan Carpenter , linux-arm-kernel@lists.infradead.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP We need to handle the case when of_drm_find_bridge() returns NULL. Reported-by: Dan Carpenter Cc: Dan Carpenter Signed-off-by: Linus Walleij --- drivers/gpu/drm/mcde/mcde_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/mcde/mcde_drv.c b/drivers/gpu/drm/mcde/mcde_drv.c index baf63fb6850a..bc11c446e594 100644 --- a/drivers/gpu/drm/mcde/mcde_drv.c +++ b/drivers/gpu/drm/mcde/mcde_drv.c @@ -319,7 +319,7 @@ static int mcde_probe(struct platform_device *pdev) struct device *dev = &pdev->dev; struct drm_device *drm; struct mcde *mcde; - struct component_match *match; + struct component_match *match = NULL; struct resource *res; u32 pid; u32 val; @@ -485,7 +485,7 @@ static int mcde_probe(struct platform_device *pdev) } put_device(p); } - if (IS_ERR(match)) { + if (IS_ERR_OR_NULL(match)) { dev_err(dev, "could not create component match\n"); ret = PTR_ERR(match); goto clk_disable;