Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3693901pxb; Mon, 24 Jan 2022 15:33:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJwTCrOHe8FOZlNO8hx7VJF6tWQ16E1rm4l6IdyN5O4rtMq680dinBjLslYF7KBvI/tIBZDq X-Received: by 2002:a17:902:e0c2:b0:14a:e796:26c2 with SMTP id e2-20020a170902e0c200b0014ae79626c2mr16528312pla.118.1643067217222; Mon, 24 Jan 2022 15:33:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643067217; cv=none; d=google.com; s=arc-20160816; b=ueAsHYbneNkPkgwOmZxK4JHdPUulkjsjOvTWJzG5mwmr/vg9XEPXiyFP4WC7cqaRBZ w5ci46xE4t+LMAGhPH6SHlTcWzrY20xghY9nfEf7C2yY7O9HvB/1cZzPVhLR87tfhbS0 JqY3GcmIAvh8YEJD6xoI8S58S6FW/l23WXau2YCAjZiZ2jPDN20nOjGlcEky85Zi/rfB v5X/8OXM6kZDQnm7AINWynItv+Hqv6041g1WNmeHyG0b80KKmlkuOkevU7H3I0IQhO86 KUPz1SCNwt7ogkVg+6t44Cwe9eRzLxznUG4iLWsUgQJp9UE+qVPO4MPMEgklx8gOnCAr 9z5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=JKW2YwBC4sAUCyY8e3E/1mZKWtktIKtsHPJu0knBGQU=; b=xJAwamTqD7kp6Oqj/hAcRDncGaLNVsXl/Oq/beqQCZB4cyr7GS1xtg8c2kx9FwDfcD GzWyTY20AqgsIu3LAzg2WnuWS5WbhcNvxYf0wQsuFrViefyNCE2BP89LHxl//+RV3ScJ 17lJUU1dfY39Xf3p3LBZS1Yf+hvi4FNNkiO/RmfNLa6AIM+ligsiXE6Aezyf7Bg1jr98 qddZ5LFDQFRaC4sp2vImgdhu40W439S/UZe6Hxr+e25n0TDm7fiK+vvROB7hFn4p7XSN +2/Mi6VMyzJqngNCbdZAvELQWiA47Sa8S87Z2eeBrm2cdWbEL0YjvIJVOcl78S+G9MNE toBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=TAFmoZaL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g5si3619953pfu.292.2022.01.24.15.33.25; Mon, 24 Jan 2022 15:33:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=TAFmoZaL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1589161AbiAXXXs (ORCPT + 99 others); Mon, 24 Jan 2022 18:23:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40994 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1835199AbiAXWfs (ORCPT ); Mon, 24 Jan 2022 17:35:48 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 28695C0E9BA3; Mon, 24 Jan 2022 12:59:01 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id D9742B8121C; Mon, 24 Jan 2022 20:58:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0A3AAC340EF; Mon, 24 Jan 2022 20:58:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643057938; bh=YRDgXVbtszFbMEbOxnXPIBVRAGY0rRsNjTeP+1sYIQU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TAFmoZaLQcWrE0wjFWHfbnLbpAj2o6626tcdFsvsfqEmbDiURzyyXCewu9rjYQGXX M+9vBMLd1nF0orGygs47On25ZNr2UF9OPz6m5Ya3/UJ6TauU7JjLqTtLe/QDYXdBi5 xGR63vcSFPQFygI714c7BXDdKn2muadWu85Y9ugI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dan Carpenter , Kieran Bingham , Mauro Carvalho Chehab , Sasha Levin Subject: [PATCH 5.16 0129/1039] media: atomisp: fix uninitialized bug in gmin_get_pmic_id_and_addr() Date: Mon, 24 Jan 2022 19:31:58 +0100 Message-Id: <20220124184129.497979574@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124184125.121143506@linuxfoundation.org> References: <20220124184125.121143506@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Dan Carpenter [ Upstream commit cb4d67a998e97365afdf34965b069601da1dae60 ] The "power" pointer is not initialized on the else path and that would lead to an Oops. Link: https://lore.kernel.org/linux-media/20211012082150.GA31086@kili Fixes: c30f4cb2d4c7 ("media: atomisp: Refactor PMIC detection to a separate function") Signed-off-by: Dan Carpenter Reviewed-by: Kieran Bingham Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sasha Levin --- drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c b/drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c index d8c9e31314b2e..62dc06e224765 100644 --- a/drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c +++ b/drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c @@ -481,7 +481,7 @@ fail: static u8 gmin_get_pmic_id_and_addr(struct device *dev) { - struct i2c_client *power; + struct i2c_client *power = NULL; static u8 pmic_i2c_addr; if (pmic_id) -- 2.34.1