From patchwork Wed Jun 29 13:20:41 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andi Shyti X-Patchwork-Id: 9205075 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 7D7E4607D8 for ; Wed, 29 Jun 2016 13:21:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6ED1928616 for ; Wed, 29 Jun 2016 13:21:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6317D28668; Wed, 29 Jun 2016 13:21:49 +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 CF1A328616 for ; Wed, 29 Jun 2016 13:21:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752711AbcF2NV1 (ORCPT ); Wed, 29 Jun 2016 09:21:27 -0400 Received: from mailout1.samsung.com ([203.254.224.24]:57719 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752659AbcF2NVH (ORCPT ); Wed, 29 Jun 2016 09:21:07 -0400 Received: from epcpsbgr3.samsung.com (u143.gpu120.samsung.co.kr [203.254.230.143]) by mailout1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0O9J02CH8BQXFN40@mailout1.samsung.com>; Wed, 29 Jun 2016 22:20:57 +0900 (KST) Received: from epcpsbgm2new.samsung.com ( [172.20.52.113]) by epcpsbgr3.samsung.com (EPCPMTA) with SMTP id C1.6E.05161.93BC3775; Wed, 29 Jun 2016 22:20:57 +0900 (KST) X-AuditID: cbfee68f-f79476d000001429-23-5773cb393ffd Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2new.samsung.com (EPCPMTA) with SMTP id E4.6D.04429.93BC3775; Wed, 29 Jun 2016 06:20:57 -0700 (MST) Received: from samsunx.samsung ([10.113.63.54]) by mmp1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0O9J0087XBQTVM50@mmp1.samsung.com>; Wed, 29 Jun 2016 22:20:56 +0900 (KST) From: Andi Shyti To: Mauro Carvalho Chehab Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, Andi Shyti , Andi Shyti Subject: [PATCH 12/15] lirc_dev: fix error return value Date: Wed, 29 Jun 2016 22:20:41 +0900 Message-id: <1467206444-9935-13-git-send-email-andi.shyti@samsung.com> X-Mailer: git-send-email 2.8.1 In-reply-to: <1467206444-9935-1-git-send-email-andi.shyti@samsung.com> References: <1467206444-9935-1-git-send-email-andi.shyti@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrNLMWRmVeSWpSXmKPExsWyRsSkUNfydHG4wYX9EhbbjzxjtVj84zmT xeVdc9gsejZsZbVY/azCgdXj+pJPzB5b+u+ye/RtWcXo8XmTXABLFJdNSmpOZllqkb5dAlfG ofdPGAtW8lRMv9fK2sB4jbOLkZNDQsBEYv7tFkYIW0ziwr31bF2MXBxCAisYJQ6uWsoEU7R4 9UMWiMRSRonehiPMEM5HRolJp76zgVSxCWhKNN3+AWRzcIgIGEuc+6EOEmYWaGaU2H3dCMQW FjCX+Lz6IthQFgFVib/fbrOD2LwCbhIbj71jg1gmJ3F5+gMwmxMovvz8TbAaIQFXidan/xlB 9koItLNLfG0+xQIxSEDi2+RDLCB7JQRkJTYdYIaYIylxcMUNlgmMwgsYGVYxiqYWJBcUJ6UX GesVJ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pJVSx1o1rhS6fHbz cJx1wltrq9skZTv/n57KS+KXLDl73Hjl9gkqf+6/dlDr+Kb/32f5NNstSzfcWdR33WVaaF+g V3xbKPvUCQ98rv348uvz6SPMgTeElViKMxINtZiLihMBsis8/6sCAAA= 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 7e5cb85..6f3402c 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; }