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: 10990051 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 D9D0876 for ; Wed, 12 Jun 2019 13:30:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C6319289FB for ; Wed, 12 Jun 2019 13:30:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BA3FD289FC; Wed, 12 Jun 2019 13:30:55 +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,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6E8C928814 for ; Wed, 12 Jun 2019 13:30:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=A5E94UX+LBtY9n40PKFKHHyfaCcUw5/CGyP9nNwsgZQ=; b=fBZNoBsEQ+Gs1I uTdhCxfhxrn3p6G4Fj3O17iHWximTfciKUCPID841/MYzNRoHr44w2ouhfxq0So6rMZB+K2nBwGjp jVq/usommxxw1QKbqHJCCOGyqPwPN21RLlkiBuxsOMk/xjpIgSr1Sei1/pkglArV/IXV82/kV9/8e pW0Gs2bSskjFdknsnHRCuM0J5FelTL3MaI1EEziyQHo1sIUOsZvRS+xWZij9WLwqHavj2qoT66xpW xrjixTpTdkAGTbHize1E1EHunMhaM1TS9saatW2qaS9yZLqVjQUJLk0uNUTe25T0RH5ru/Fi29i/n 6eMza28oTiNLC1rWXBkA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hb3L0-0006QS-2x; Wed, 12 Jun 2019 13:30:50 +0000 Received: from mail-lj1-x244.google.com ([2a00:1450:4864:20::244]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hb3Kv-0006Pk-TK for linux-arm-kernel@lists.infradead.org; Wed, 12 Jun 2019 13:30:47 +0000 Received: by mail-lj1-x244.google.com with SMTP id t28so15094024lje.9 for ; Wed, 12 Jun 2019 06:30:45 -0700 (PDT) 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-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=k95nsGT4B0MJWldf5PzYp3VwC0OVNaDTdceYhuetPZCuFEijak6XYFURSjX+i9awJg Jx6yQecw2/11ICyGnjt39ITGzvSGJG8OFVljL780lGtt9jh8ZgvWD9P5c1g09YXBdClQ MthHyj+4ccwr8E5Dwz+G/jX3ud/6v+CgEU23rti1TmmbV7/s7c8GjtlPzcXV/QlZzzcp Bumt/DsKyq5Zz5wQB1WRUCYbHmUhPUp6Y5gJ9X/M2OZ027lS7xPa3+s8kvMGBnWmXOR3 3xjvlDgySxc9imDAwzWdbK6gT9phiy3TyjfU4xRi6qIxKtpEMpwJaURF/QBjQzYMaAaI 7nvA== X-Gm-Message-State: APjAAAUSJF/zWwPL2XxugzOKbB7ZPUyQM8BG4S6xlopovy9M7m7ctXRa woH+v9bQKnItVptelppSTFyVXA== 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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190612_063045_959990_95DD508E X-CRM114-Status: UNSURE ( 9.83 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Linus Walleij , Dan Carpenter , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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;