From patchwork Sun Oct 6 17:19:28 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 175294 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp3305500ill; Sun, 6 Oct 2019 10:39:47 -0700 (PDT) X-Google-Smtp-Source: APXvYqwvTeNyUp+R8lVp/OmUYDkxcCKFSZwlBzDM1CLwAE2fo25z2ShNk3FBFMG9r1yzdJfsQtEi X-Received: by 2002:a17:907:205b:: with SMTP id pg27mr20346423ejb.135.1570383587299; Sun, 06 Oct 2019 10:39:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570383587; cv=none; d=google.com; s=arc-20160816; b=c5NG3+Z7TNGJT1EAxuAH8hsXDikr5c0XTNtrnojkpLprV1tqkeViiouqp2C3/dgt69 H3GcSYin+qmClCE2A3SWcvrILuGrZHS3zh8Skguw9L/S//SjhJFrFwoKrT0cm0ur5Lgg 36x492TsWjOTPUSvqcEhDrZOwB1pB+5/L44dmhu48Mw5EbdKUW8Fo0DujHEtXIVdB9ZG PVMOkpkSlz1uqC2yp7RQbuNIVucys0845ZUvhtePAOIcrZX7mvtG1YhyHzVPmAlrTNMk WKq+BGBhXHhfP4vM/TNE+f22j9detRJcqc5KOFEXAkHjKsUDTPGcMGuSZfhtH7cRhyxN b7kw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=hmWSX0zBKuSyTQ8BDHoqyoMZvAsZ9/Qt35o4Ay8OkU8=; b=UnBJx23bG5Hk2ycUxiD5hxzG8uOBHO4lAdje1SDHR712PXmL3wZ2QJFRtjAE6swpAt Xqrph/CvpzmEokqM1yHxBnKIH2EN2grAf54fS0YGKde7W/F6i8rbaIR78S6SUTUItl9G iqDFxM8zgiGdFbTKNvj/gktd2YgGqJ0Js2OPaoXtI7lmz4fPyBWOg12812l0zABy5icq 1y9Oe811c0WcvlBJiMGmi3CeIiGqoiebbjB0LqBUQPf0R+87Ca0rSimnyKgk3YvFlJlu DhKA/9Sp74h72wJCwQG1UXRzUYeXcPmiwhvnfTLc/tSqYyTH/U15NZoERP6KxWUzo2kG vCMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Xv7a+4y8; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g21si7468207edg.339.2019.10.06.10.39.46; Sun, 06 Oct 2019 10:39:47 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Xv7a+4y8; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730836AbfJFRjo (ORCPT + 27 others); Sun, 6 Oct 2019 13:39:44 -0400 Received: from mail.kernel.org ([198.145.29.99]:39170 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730829AbfJFRjm (ORCPT ); Sun, 6 Oct 2019 13:39:42 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 14F132080F; Sun, 6 Oct 2019 17:39:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1570383581; bh=JJiAr0U+y5fK3GJTz/G2EY+1qfyIBZP/h1D8Vy3Euz4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Xv7a+4y8peWBwCQ6mIRjKp5ihLBeSXt5ivc6T9LTKwMiXCaFmXibpy76Mw5nTDsff /tt4MPtlxA/pn43bTa8Na0KjQU0F6s3oH2Bjo2XKILIQxVcwTVg7pXJY9nRANuuLdP BQsVvg4zO624fmuhT46znQ6NSzA18p7Ie0r0RJgw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dan Carpenter , Linus Walleij , Sasha Levin Subject: [PATCH 5.3 002/166] drm/mcde: Fix uninitialized variable Date: Sun, 6 Oct 2019 19:19:28 +0200 Message-Id: <20191006171213.003375227@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191006171212.850660298@linuxfoundation.org> References: <20191006171212.850660298@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Linus Walleij [ Upstream commit ca5be902a87ddccc88144f2dea21b5f0814391ef ] We need to handle the case when of_drm_find_bridge() returns NULL. Reported-by: Dan Carpenter Acked-by: Dan Carpenter Signed-off-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20190618115245.13915-1-linus.walleij@linaro.org Signed-off-by: Sasha Levin --- drivers/gpu/drm/mcde/mcde_drv.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) -- 2.20.1 diff --git a/drivers/gpu/drm/mcde/mcde_drv.c b/drivers/gpu/drm/mcde/mcde_drv.c index baf63fb6850a4..a810568c76df7 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,6 +485,10 @@ static int mcde_probe(struct platform_device *pdev) } put_device(p); } + if (!match) { + dev_err(dev, "no matching components\n"); + return -ENODEV; + } if (IS_ERR(match)) { dev_err(dev, "could not create component match\n"); ret = PTR_ERR(match);