Received: by 10.223.185.116 with SMTP id b49csp2211064wrg; Thu, 15 Feb 2018 08:09:59 -0800 (PST) X-Google-Smtp-Source: AH8x224ZrepLQuCoB2jgqxeUGX2UIWbiDBHx4guGVidtXgZNh4m8d+cTshUz7Ft1ZfJ/H+RJyHKu X-Received: by 10.98.202.205 with SMTP id y74mr3060363pfk.49.1518710999741; Thu, 15 Feb 2018 08:09:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518710999; cv=none; d=google.com; s=arc-20160816; b=lV88nzmW0ybp0m73wKnjKzPfor0NJvCuZ4WEurwVGzDGUIZAnWiv+M+yYzVZ1QMwT2 KArX1Ev0qM8c7wkKuzuMu+y3xpfWF8w9MAaUVXKvAS9h+nADHj+Wi+J+RbZMzjv/aEEE A9wvgVA9mEBKVsu1dNihrzgMbUDO2D4aCGuoH33PL7+KIBcRZsL1aNyHbtsMpAM9oPy8 L4ZWwT3J1huOUrqDT53AL2yJUp1KKKYlSQ+QBbc/j+haLdTpbZFiwC50/auRAogWKbgL smSdloKFHh5zjbr7oEFwYFbO2KylI7JHsL3JjYxkOcgZQCedfPWodINLi+se1povCpMo 42HA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=lcyEYzbhMr1AkNyjrn6xYHAhYX0JO1iDG4we3xALJCM=; b=POxcOWzwclkhgpsDu7uiwP3hi4HHzjJFdxZB0OyUQlNP0ive+7OM5bURn/1kQGj5j0 tji0bm2GLndps267BEE0Gd8wQB//VcJ3QOPrWTuwVSZTsQooiL7UMBupjFtnKWnoDX8Q ZyqxiD2zy8vlg+Tyh9qR8PA9MfS39QWX0ix0Z/XH9L3DzXtSjp43HUApOrqwhnn1t9Au TDQ61Pi3HsdhsZaE5326iXMqEUnEMAtf5FQrzQdyE87zaGNE+RHTUU/NnvdUUHFls6Yh oHUAlCLL22VsSHPM+l5BeI2PQ16A9japz+waToXhQjUFC2DocYmpmvWsD6vXujFOjYpM 8lXA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k7si4354002pgp.153.2018.02.15.08.09.44; Thu, 15 Feb 2018 08:09:59 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1425546AbeBOQIR (ORCPT + 99 others); Thu, 15 Feb 2018 11:08:17 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:34984 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1424477AbeBOPp3 (ORCPT ); Thu, 15 Feb 2018 10:45:29 -0500 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 61E6B11C5; Thu, 15 Feb 2018 15:45:28 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Mauro Carvalho Chehab , Daniel Scheller Subject: [PATCH 4.15 150/202] media: dvb_frontend: be sure to init dvb_frontend_handle_ioctl() return code Date: Thu, 15 Feb 2018 16:17:30 +0100 Message-Id: <20180215151720.826401890@linuxfoundation.org> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180215151712.768794354@linuxfoundation.org> References: <20180215151712.768794354@linuxfoundation.org> User-Agent: quilt/0.65 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Mauro Carvalho Chehab commit a9cb97c3e628902e37583d8a40bb28cf76522cf1 upstream. As smatch warned: drivers/media/dvb-core/dvb_frontend.c:2468 dvb_frontend_handle_ioctl() error: uninitialized symbol 'err'. The ioctl handler actually got a regression here: before changeset d73dcf0cdb95 ("media: dvb_frontend: cleanup ioctl handling logic"), the code used to return -EOPNOTSUPP if an ioctl handler was not implemented on a driver. After the change, it may return a random value. Fixes: d73dcf0cdb95 ("media: dvb_frontend: cleanup ioctl handling logic") Signed-off-by: Mauro Carvalho Chehab Tested-by: Daniel Scheller Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Greg Kroah-Hartman --- drivers/media/dvb-core/dvb_frontend.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- a/drivers/media/dvb-core/dvb_frontend.c +++ b/drivers/media/dvb-core/dvb_frontend.c @@ -2110,7 +2110,7 @@ static int dvb_frontend_handle_ioctl(str struct dvb_frontend *fe = dvbdev->priv; struct dvb_frontend_private *fepriv = fe->frontend_priv; struct dtv_frontend_properties *c = &fe->dtv_property_cache; - int i, err; + int i, err = -EOPNOTSUPP; dev_dbg(fe->dvb->device, "%s:\n", __func__); @@ -2145,6 +2145,7 @@ static int dvb_frontend_handle_ioctl(str } } kfree(tvp); + err = 0; break; } case FE_GET_PROPERTY: { @@ -2196,6 +2197,7 @@ static int dvb_frontend_handle_ioctl(str return -EFAULT; } kfree(tvp); + err = 0; break; }