Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp348669pxu; Thu, 7 Jan 2021 06:40:10 -0800 (PST) X-Google-Smtp-Source: ABdhPJz3LRXUX8EwumT5Fw12j0lUPqnnQFPuK7DQEFcmf89tL+UGD4tkJ3rkTrGjtiPKk8RUJ48D X-Received: by 2002:a17:906:378f:: with SMTP id n15mr6418414ejc.263.1610030410455; Thu, 07 Jan 2021 06:40:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610030410; cv=none; d=google.com; s=arc-20160816; b=rWDWTGpECHYifYElgSXFWKBZnj3BpeiU8p85hqVq8oGywdpOqXjFsWuUGicEs52+uU Rg1zVqFdTBIFeDGYiLhEOWaPV23OSk7+ekY8033lHBGj7p8qx+bBQOEmTgcn/kgJr6O9 xPAAc/z5w+eHMv6D3F+5CBSBSdfs4G/0c9olhAL1a3N3DRIFFJ823h+IPy33aL1WxOAm YrIppGe0hLjCkOuUetU8vHeBzfEezjuJD8Oj2qfVdR0lUlFRpgwm6HIwaY/SBflXBufR HicaK/shOqVpI65cPENw95U1MtdVybWp3pGla/8Z8W2Y+LPLPdIpgj0kW/msKXJOm1+g ov6g== 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=kP0qa0U4X/IdvuYKAJp0qhk7i8ek2a832xYdd7hN1Zs=; b=hmmleDoFTxDz6G9/5wG9pK+Rn0gd5+siboKin9zvjC5QNpSx+qNrqUlmojj0wmg2tJ Fmm+gLXKlqHvKQw0yCIZJKmFBcebpTGgPvaCWrkbkAtHD9wVysE1WcDO+Cv9Usdpz8Pi U41wPF0pO9w4Hq1EMFg6Qrzo+E4oT5n/FtlEFCP/wAzDODbXhoAD8wEzIx/GA5SNcurf zigJKZ0JdexH/gVXSdkJLXJf6D6IMqeiIEJ93AkX4eNsn1b7sKf7cMf+0mdLsOITvehO vfHFR0XUKYBw8PdAEimu6udrdtjyEVFoUNVxq14PPoR5/A2yv4o0HqxlqIawcgruo0JE FQtQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=dmHDq3j4; 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 s18si2383347eji.645.2021.01.07.06.39.46; Thu, 07 Jan 2021 06:40:10 -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=dmHDq3j4; 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 S1729075AbhAGObx (ORCPT + 99 others); Thu, 7 Jan 2021 09:31:53 -0500 Received: from mail.kernel.org ([198.145.29.99]:45878 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729018AbhAGObu (ORCPT ); Thu, 7 Jan 2021 09:31:50 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 119E22336D; Thu, 7 Jan 2021 14:30:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1610029849; bh=DFWKiau7hlhlTqppCxv5Uc3+xLeRAQL1o3WuyyBMoVw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dmHDq3j4xzt1cOM+Aa+jCna60mIy1nGnpJX3wJfsATaO2z7labrKmYBJIrjTyq+Gt N/RjBue+ECuB4QWAy4dzR8VRT1Fs+FGv9PsVqhUsay0KEW8rFwrxDY8pXDhbj4FL3S GWKETGXOASmQGu2Y4RnUltgIYLOJwVFM4F9BzJGE= 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 4.14 17/29] media: gp8psk: initialize stats at power control logic Date: Thu, 7 Jan 2021 15:31:32 +0100 Message-Id: <20210107143055.339442798@linuxfoundation.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210107143052.973437064@linuxfoundation.org> References: <20210107143052.973437064@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 @@ -185,7 +185,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) {