Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2172847imm; Mon, 28 May 2018 03:11:42 -0700 (PDT) X-Google-Smtp-Source: AB8JxZq1Ezcgqr67n7x6mpKQdY8J1KxNFsPdGBunOLzxt+jadiYdNYqAJLbk6PEPEw3RMeJs67jD X-Received: by 2002:a63:770c:: with SMTP id s12-v6mr9897589pgc.17.1527502302415; Mon, 28 May 2018 03:11:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527502302; cv=none; d=google.com; s=arc-20160816; b=gECOSHYuaHOf6pbqex7+wr6Pk7tV1uR54W11WyNmr+CeBwygy5uq0fLaMok15tVQBK seO7YX+MQR1VP33yNctcNb7MYO1gMFGHiE9c94lpGPaqz3AOXftcO+3fwP/QwzY730dY NDiQXud8yuFNVJIVEyF88qhQc0YDftX0QDjf8zbfTXdoBQ6s0YEHNUnSWkj3iVC5N+xB btwCi/r6pe5nT5ZgoCI8MrKuQRTG8Vjb9BtJDvW1u+AhDKI0qPIwBRw9mrP73cvvrnRX wzipcSAS17pWtoa6mZpCr8ABCDR18QrsAe508sbZLngr7IL3t5sRxYEENNionsO3SVUx Uz8Q== 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:dkim-signature :arc-authentication-results; bh=6dmQQ4gS8YFD8qK+wH84E9+vmM9f7aJ196WJI9QiaDU=; b=eGOeNBOIqX+X5dqXWWWP4Fq8O+sctI2w8QcwPCMnVPYLrx27sTgoE+LYzfd4+7lK7Y V/BQVeyYvEeBpkntUKQ1tVR6D9j/vp00XyyOChjDKj/h6CamFHOF16s5u5NHeJXwi3R/ s74xzji5DipBD742k70EVHyy29VQW5e9+GKlBBykS/ElOW981bBtAPpi/cWQgU2xMgIt OK2T6dCk6gVwlHB1kz/MArjvwR8FPIFOV9lD3X7dcA5fedPopuUWLsma8pM3aYPUcfem gTV2XlMnD8tMQXdSRHUjIfE7IyLxTG2mDkygmNf+iD5INGn6GLXT2FXJfo1twBXYQpCe d6xA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Fm2DHzGy; 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 q6-v6si23985888pgs.451.2018.05.28.03.11.27; Mon, 28 May 2018 03:11:42 -0700 (PDT) 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; dkim=pass header.i=@kernel.org header.s=default header.b=Fm2DHzGy; 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 S936468AbeE1KKR (ORCPT + 99 others); Mon, 28 May 2018 06:10:17 -0400 Received: from mail.kernel.org ([198.145.29.99]:58296 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933629AbeE1KKH (ORCPT ); Mon, 28 May 2018 06:10:07 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) (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 7FD1C2086D; Mon, 28 May 2018 10:10:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1527502207; bh=Tk2G0ak5tG7Ih0CaLcJ3cBwU2Fa9OYeBABe3MDLwDnQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Fm2DHzGy7N2eUdzHfrpdJGSqW6bQUorbAvn1mAETJOG5atJda2+Z+qHQrm6U/U/w3 qyHlc0+wOKj1cx4OtRPqrh864X2OK87QLcoMa1gpriQQMEV1ka2nRpHD98NoYIhNsz ZjnTs2NLE273Ay6Gqu8KFS8lBIQlD5ZJaQg71YiY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Mauro Carvalho Chehab , Sasha Levin Subject: [PATCH 3.18 072/185] media: dmxdev: fix error code for invalid ioctls Date: Mon, 28 May 2018 12:01:53 +0200 Message-Id: <20180528100056.912837070@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180528100050.700971285@linuxfoundation.org> References: <20180528100050.700971285@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review 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 3.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Mauro Carvalho Chehab [ Upstream commit a145f64c6107d3aa5a7cec9f8977d04ac2a896c9 ] Returning -EINVAL when an ioctl is not implemented is a very bad idea, as it is hard to distinguish from other error contitions that an ioctl could lead. Replace it by its right error code: -ENOTTY. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/media/dvb-core/dmxdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/media/dvb-core/dmxdev.c +++ b/drivers/media/dvb-core/dmxdev.c @@ -1069,7 +1069,7 @@ static int dvb_demux_do_ioctl(struct fil break; default: - ret = -EINVAL; + ret = -ENOTTY; break; } mutex_unlock(&dmxdev->mutex);