From patchwork Fri Jul 1 08:01:35 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andi Shyti X-Patchwork-Id: 9209495 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 0CDBD60752 for ; Fri, 1 Jul 2016 08:37:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F28362869F for ; Fri, 1 Jul 2016 08:37:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E608E286A4; Fri, 1 Jul 2016 08:37:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6832A2869F for ; Fri, 1 Jul 2016 08:37:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752164AbcGAIhi (ORCPT ); Fri, 1 Jul 2016 04:37:38 -0400 Received: from mailout4.samsung.com ([203.254.224.34]:46346 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751218AbcGAIhf (ORCPT ); Fri, 1 Jul 2016 04:37:35 -0400 Received: from epcpsbgr3.samsung.com (u143.gpu120.samsung.co.kr [203.254.230.143]) by mailout4.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0O9M012NRMAZEVB0@mailout4.samsung.com>; Fri, 01 Jul 2016 17:01:47 +0900 (KST) Received: from epcpsbgm1new.samsung.com ( [172.20.52.113]) by epcpsbgr3.samsung.com (EPCPMTA) with SMTP id DB.63.05161.B6326775; Fri, 1 Jul 2016 17:01:47 +0900 (KST) X-AuditID: cbfee68f-f79476d000001429-95-5776236b16c3 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1new.samsung.com (EPCPMTA) with SMTP id 0C.75.02101.B6326775; Fri, 1 Jul 2016 17:01:47 +0900 (KST) Received: from samsunx.samsung ([10.113.63.54]) by mmp2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0O9M00G9YMAVFJA0@mmp2.samsung.com>; Fri, 01 Jul 2016 17:01:47 +0900 (KST) From: Andi Shyti To: Mauro Carvalho Chehab Cc: Joe Perches , Sean Young , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, Andi Shyti , Andi Shyti Subject: [PATCH v2 12/15] [media] lirc_dev: fix error return value Date: Fri, 01 Jul 2016 17:01:35 +0900 Message-id: <1467360098-12539-13-git-send-email-andi.shyti@samsung.com> X-Mailer: git-send-email 2.8.1 In-reply-to: <1467360098-12539-1-git-send-email-andi.shyti@samsung.com> References: <1467360098-12539-1-git-send-email-andi.shyti@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrLLMWRmVeSWpSXmKPExsWyRsSkUDdbuSzcYGajgcX2I89YLRb/eM5k Mfv+YxaLy7vmsFn0bNjKarH6WYXFwqffWRzYPa4v+cTsseSNtceW/rvsHl9WXWP26NuyitHj 8ya5ALYoLpuU1JzMstQifbsEroyHs3ezFazkqWi7PomtgfEaZxcjJ4eEgInE9I4dzBC2mMSF e+vZuhi5OIQEVjBKHO8/zgZTdGLrcyYQW0hgFqPE/7vKEEUfGSVWb+9jBEmwCWhKNN3+AdTA wSEiYCxx7oc6SJhZ4ACjRG+3C4gtLOAkMWfucxYQm0VAVaLz7Xd2EJtXwF3i+aRbTBC75CQu T38AtpcTKH733S5GiL1uEnN33WMH2SshsIhd4sODecwQgwQkvk0+xAKyV0JAVmLTAahnJCUO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3ZX8fy3dMlNjacZ1+ucCfWW7wxgXevl3udb0d+eEb7 nIkzr7Um+nuejelUY3q3eQ1T4Yu5FjnZ2/7/vhb2uyP140/Z3doLpilJryw9syzA+Ke7qqfn 6/UvK6dw2d2eOsuamTXwa6zXlhmKmxec/nb4brROkDVr2s7levFnlViKMxINtZiLihMBNOpY Kr0CAAA= DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP If ioctl is called, it cannot be a case of invalid system call number (ENOSYS), that is an operation not permitted (EPERM). Replace ENOSYS with EPERM. Signed-off-by: Andi Shyti --- drivers/media/rc/lirc_dev.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/media/rc/lirc_dev.c b/drivers/media/rc/lirc_dev.c index 689e369..99d1f98 100644 --- a/drivers/media/rc/lirc_dev.c +++ b/drivers/media/rc/lirc_dev.c @@ -587,7 +587,7 @@ long lirc_dev_fop_ioctl(struct file *file, unsigned int cmd, unsigned long arg) break; case LIRC_GET_REC_MODE: if (!(ir->d.features & LIRC_CAN_REC_MASK)) { - result = -ENOSYS; + result = -EPERM; break; } @@ -597,7 +597,7 @@ long lirc_dev_fop_ioctl(struct file *file, unsigned int cmd, unsigned long arg) break; case LIRC_SET_REC_MODE: if (!(ir->d.features & LIRC_CAN_REC_MASK)) { - result = -ENOSYS; + result = -EPERM; break; } @@ -615,7 +615,7 @@ long lirc_dev_fop_ioctl(struct file *file, unsigned int cmd, unsigned long arg) case LIRC_GET_MIN_TIMEOUT: if (!(ir->d.features & LIRC_CAN_SET_REC_TIMEOUT) || ir->d.min_timeout == 0) { - result = -ENOSYS; + result = -EPERM; break; } @@ -624,7 +624,7 @@ long lirc_dev_fop_ioctl(struct file *file, unsigned int cmd, unsigned long arg) case LIRC_GET_MAX_TIMEOUT: if (!(ir->d.features & LIRC_CAN_SET_REC_TIMEOUT) || ir->d.max_timeout == 0) { - result = -ENOSYS; + result = -EPERM; break; }