Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp13929767pxu; Mon, 4 Jan 2021 08:13:20 -0800 (PST) X-Google-Smtp-Source: ABdhPJyvmM1MJDtEaEIBWsyD7YxEGhHslVxTyvEK1ms/JP3yVjuovBOheYaBH5Hz54Z+Df1k1v8x X-Received: by 2002:a17:907:1047:: with SMTP id oy7mr27482270ejb.134.1609776800247; Mon, 04 Jan 2021 08:13:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609776800; cv=none; d=google.com; s=arc-20160816; b=ZZ0hVOX1/WEo2oih2NeQRKUy3oiJc/Bng2usAfFYt3TAA6ipmVe+5LcO8WVfEqaJJL 1+u0gy5uF1KTwUBQONvekyDq6fds9Tu2kjeq7BcGv+nknu36IbbG/oogzwzBczcmV+PN IIyvhPVDqvXM8RnHiV7EEHL7oXOgVi+1n6r/aPdzQ9uSkZcx7ba3JBs8kzNxFsZ8H882 t89R+gnLVOynez27Yh+BTO80O2OOFN9dTEK2/EmnjAcU1+Hov4zpqzwFLu4jGMptCSQJ EszVswoomRYbJ6cynWkxAiHomsupBBANlueMvBgxwH6Vawg34vljeBMc/Gf7Z4Kee7Sk pgeA== 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=NTIwYZH9LTqz8mD9iGzH+5tw1UOrhrOG95mReT2UG5A=; b=mccvPysxaXpmfJos4bejB8mZOwITMhdrtHaxznIJ/BkARzgxyMt0quh/6jpxlNzvmC wbKnxT2ESQKseqeXn0Cdnudi1f7aCKikD6+cXoGUFeltyd4erWRY86VWtn/qVzIdUu0V otZLfBnovMhOBxCJAxw+5pTx7vjlQf07Snn8pVAD71XCpRNlaDFc2VjnV12a32uuirkb hUjB23A7pJRqy0EQWmSHEoNoRJr+oKgKIz4r+Z9bW1JqNV8xN2rDNVqXmrgx9CjnNksN jwhejMZxrF+N8dVeU54Wq2kuM7a7jcmJE8rV8ra4LXX+RBekY9+Qb4NYC2yZLuXGMUag oXUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=viDajjYe; 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 w29si31802514edl.176.2021.01.04.08.12.57; Mon, 04 Jan 2021 08:13:20 -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=viDajjYe; 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 S1728944AbhADQKi (ORCPT + 99 others); Mon, 4 Jan 2021 11:10:38 -0500 Received: from mail.kernel.org ([198.145.29.99]:37132 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728314AbhADQAW (ORCPT ); Mon, 4 Jan 2021 11:00:22 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6E3BC207AE; Mon, 4 Jan 2021 16:00:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609776006; bh=6klDzbX4FQiuaswtnqPILcKm00O72X6oRw8pRkFUjYY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=viDajjYepEJeeNESUh+zK8z/vlseBbwZ1wjSGf5lnNQqrkrCA3+GSmGq1ASxTpY8s yEiY/JaMf3SloRGWpV0gCpjj8NBQQ+UGh8Gr5jw6V3mFUy/nj5NjhMTZbpkLvncnFZ 7gLKHs9S/B+saAIZyuYx8a9WcaTW7j0KUggavmfI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, syzbot , Willem de Bruijn , Mauro Carvalho Chehab Subject: [PATCH 5.4 28/47] media: gp8psk: initialize stats at power control logic Date: Mon, 4 Jan 2021 16:57:27 +0100 Message-Id: <20210104155707.104533461@linuxfoundation.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210104155705.740576914@linuxfoundation.org> References: <20210104155705.740576914@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: Mauro Carvalho Chehab commit d0ac1a26ed5943127cb0156148735f5f52a07075 upstream. 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: Greg Kroah-Hartman --- drivers/media/usb/dvb-usb/gp8psk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/media/usb/dvb-usb/gp8psk.c +++ b/drivers/media/usb/dvb-usb/gp8psk.c @@ -182,7 +182,7 @@ out_rel_fw: 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) {