Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1161350pxu; Fri, 27 Nov 2020 00:52:02 -0800 (PST) X-Google-Smtp-Source: ABdhPJxNRUR1M7s1cG4n047OIfEjAz0TXk8ISqFVEQI/LMiEPOsCdJWCFvcK6pfCQ5ofvR97v6IY X-Received: by 2002:a50:e00f:: with SMTP id e15mr6670057edl.210.1606467122011; Fri, 27 Nov 2020 00:52:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606467122; cv=none; d=google.com; s=arc-20160816; b=kWhDQy9h+uVlTtGxUmP5+1yWpGbFfVmSfthbGuuMD20jEUqIvyscF8pjL0O+AjB2U/ 0Qduxp9YTVPs/1WwF5sh3K4VnLb4tsqEiWoyRXFBa3+b8rNWMoCr/Uad5bmtTqmODDi/ EOjQavyEOXn1aMS4rQRoq/N4I9qr7twnxK80ym9ntuBTA/nxLx7a2DeGYnuzE0tSt+1T MKA+pT/2mImipkTGi17/0bjGC2d5aTbREACGgCvJAc6rnAo6853VdeYoEH+0rSPMAQFQ P3TF7xK44js/CvckzhVCVUxCzUtChd5fnqyPMTmZmAXo6csKaQWuE5shf0U5P1KjbTnG lS8A== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=PxcI2VjQoAVob+1mTTr0w7V6Uc/Laco7qD8FMKXMChM=; b=QQkLIe447aLmtEeV1hGbOM2bnbj6Y5wdE/fqSMUaP/BvrepGPdypnUE+j6cOjyQm+l vYX6I+XWlrJuSsT3oSLZDS1ALdZ0KAEnrmK3qS23OqHBV9SZXqwQm/IiA1hR402RYRVe UaLFssiiHReH7YsnR4LcaORLTPbd57c9dKRqrIvN/I2BE5Z+UKUbUshy0EmMYJ/lNV1Z 01IT3OdE2coBpHPb9itEI1Hi5Yekkesa07JQpqjV9tItzSlpbcC5mIV0frks1qqdw64a TUTROpAvRhX2ti3PrQ+T2WpoKvwf0kxoTuCLxV7zzCpnw2xNKPxjf0KGNGBlwuRYC7fG Qu9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=gAjGd3MX; 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 cz9si4413900edb.289.2020.11.27.00.51.39; Fri, 27 Nov 2020 00:52:01 -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=default header.b=gAjGd3MX; 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 S2387774AbgK0Gqh (ORCPT + 99 others); Fri, 27 Nov 2020 01:46:37 -0500 Received: from mail.kernel.org ([198.145.29.99]:49230 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729688AbgK0Gqe (ORCPT ); Fri, 27 Nov 2020 01:46:34 -0500 Received: from mail.kernel.org (ip5f5ad5a6.dynamic.kabel-deutschland.de [95.90.213.166]) (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 419CB20665; Fri, 27 Nov 2020 06:46:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1606459594; bh=vXhfPgW3IibTyXmRxFq3IfR9DsjEd1ueHgNWyhNMJew=; h=From:To:Cc:Subject:Date:From; b=gAjGd3MXTxOyRJfI+sOkbOAv9TCGGrV6NUOfXynp8jNqUKCbAX7sT4kTdtC8PTkyB +qVvO5vmvlZEkiUO0nUVkV5T0121gRPdF5YArLs3dvfBBAlmJUYM+Gr5Mea9Chlyn2 U0QCJh2DDL2bNNfmXVgoUYWnV0HE2MkRVDFA/C9E= Received: from mchehab by mail.kernel.org with local (Exim 4.94) (envelope-from ) id 1kiXWZ-006K7b-GL; Fri, 27 Nov 2020 07:46:31 +0100 From: Mauro Carvalho Chehab To: Linux Media Mailing List Cc: linuxarm@huawei.com, mauro.chehab@huawei.com, Mauro Carvalho Chehab , Mauro Carvalho Chehab , linux-kernel@vger.kernel.org, syzbot , Willem de Bruijn Subject: [PATCH] media: gp8psk: initialize stats at power control logic Date: Fri, 27 Nov 2020 07:46:25 +0100 Message-Id: X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: Mauro Carvalho Chehab Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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 c07f46f5176e..b4f661bb5648 100644 --- a/drivers/media/usb/dvb-usb/gp8psk.c +++ b/drivers/media/usb/dvb-usb/gp8psk.c @@ -182,7 +182,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.28.0