Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp5453072pxu; Tue, 22 Dec 2020 18:27:50 -0800 (PST) X-Google-Smtp-Source: ABdhPJyn+kTFhQicayjvspMr6Z9OvTPzXwSI4AcNoPMrYqlW/2RfBXWKqgglpGJsFTI6fiDXmG54 X-Received: by 2002:a50:b905:: with SMTP id m5mr22410937ede.292.1608690470777; Tue, 22 Dec 2020 18:27:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608690470; cv=none; d=google.com; s=arc-20160816; b=ZHrJmP0HJTPGn8cP5ulUgLwd1AnPyMTBxr3vuSUKYt70cKc1OtnxwV/rjDiksw6pQI 8RD+14n+/NiH/fyRLe1mFVohspXuOrQ369C6MQqEtr30owFz7v382JK+WOlU2xmyt5YX GpTwnyhqCrtc+dPFmhy80LcwxzYtlTfU+OD2/lvBnC1qGxKJ1P47MnkBVJOL7Oks+Alq chU2/1jHnUh6dRLvFIwP9CfqjB6SRo7Fc21eES9Lg436WQnfv+OqdXaWS3CG1/koCrrK P8HmUB2GhVVklLBllqdfjRXCKeRgrQ1eYugd/TL1Qo0YfVO3679pM1Cfn7X6RNgWaChO by/w== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=XTmCXxpX7NNkQJqPrCBNv7gu4XzUrzCrukWZu7nngzA=; b=GUiUz5yT6QgNrI8tMjjHV2GvnjV/oLHzrAjO0Z8sM6u5LrI99xVShxIZ0YukZGA4Kw keLdkBkPAj0Vhfuq5ICCJ4bsntwFXzh3w4XfhDotP55Sa5/FVfslVjsjCbPRl0+v8uUr EtU/C2pWfd49+zIAoIxCV9NhGP+lIignzqL/xXH8TWe2foMKp+Wu0A/TTLkhI9HtJTc3 Ar4BHpNrhL3cZ2iLiATWJx9Li+VRY1X2U8uqGzg4b753dUjpOhJvMqIoKiVgab1ETt23 ujUA86NJsKK4ooyoBkSA4KzLPwVksPP48uV+5rD8/iNjDYy2WUmVE8X//sSCaSlD7+An HUJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=IrfH72gw; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j23si10816554ejb.158.2020.12.22.18.27.28; Tue, 22 Dec 2020 18:27:50 -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=@kernel.org header.s=k20201202 header.b=IrfH72gw; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730152AbgLWCYL (ORCPT + 99 others); Tue, 22 Dec 2020 21:24:11 -0500 Received: from mail.kernel.org ([198.145.29.99]:52560 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730109AbgLWCYD (ORCPT ); Tue, 22 Dec 2020 21:24:03 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id CED8622A83; Wed, 23 Dec 2020 02:23:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1608690228; bh=zvHpdA/aaAM/Q8Xg09xdN/QJh90o+FNkzC4xz4v4IB4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IrfH72gwNlW35sXN8mrWCmQ5tlz8wuvPwD43nt9LyOQoEdY3RpyADcII5zpsCG0Z4 zuNWj2F29v3kFKpTrw7kTwW+iWyWzE9hBS+S8cjvn9gJTpAGUQKArqb5J+quxuAHLB 9IbRe+XsoqA+sjLrGsG5ncUxnqwkABaRxEcNF+Mts2ui/OA04ppvsNP7Mpzz0TWg7s EALpkPCX333OszzF+qpQeYKYd5tzP3Hzt/9Nyx6SheZevh8QpMPsIfIrwWJ0vnmSFB r7XnjJh1/cU2HKgrb5620OY7YR8YwKVr9xBQKNkqBVbnMBV3+l7lveMzJjGpeMV2Ux m7t2mv1xC1/eA== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Mauro Carvalho Chehab , syzbot , Willem de Bruijn , Sasha Levin , linux-media@vger.kernel.org Subject: [PATCH AUTOSEL 4.14 44/66] media: gp8psk: initialize stats at power control logic Date: Tue, 22 Dec 2020 21:22:30 -0500 Message-Id: <20201223022253.2793452-44-sashal@kernel.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20201223022253.2793452-1-sashal@kernel.org> References: <20201223022253.2793452-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Mauro Carvalho Chehab [ Upstream commit d0ac1a26ed5943127cb0156148735f5f52a07075 ] As reported on: https://lore.kernel.org/linux-media/20190627222020.45909-1-willemdebruijn.kernel@gmail.com/ if gp8psk_usb_in_op() returns an error, the status var is not initialized. Yet, this var is used later on, in order to identify: - if the device was already started; - if firmware has loaded; - if the LNBf was powered on. Using status = 0 seems to ensure that everything will be properly powered up. So, instead of the proposed solution, let's just set status = 0. Reported-by: syzbot Reported-by: Willem de Bruijn Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sasha Levin --- drivers/media/usb/dvb-usb/gp8psk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/usb/dvb-usb/gp8psk.c b/drivers/media/usb/dvb-usb/gp8psk.c index 37f062225ed21..aac677f6aaa4f 100644 --- a/drivers/media/usb/dvb-usb/gp8psk.c +++ b/drivers/media/usb/dvb-usb/gp8psk.c @@ -185,7 +185,7 @@ static int gp8psk_load_bcm4500fw(struct dvb_usb_device *d) static int gp8psk_power_ctrl(struct dvb_usb_device *d, int onoff) { - u8 status, buf; + u8 status = 0, buf; int gp_product_id = le16_to_cpu(d->udev->descriptor.idProduct); if (onoff) { -- 2.27.0