diff options
author | Lad, Prabhakar <prabhakar.csengg@gmail.com> | 2013-05-14 00:45:17 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-05-27 08:34:56 -0400 |
commit | 7eac97d7e714429f7ef1ba5d35f94c07f4c34f8e (patch) | |
tree | 58ee47b8b4508f354b47cbd3d2f081c37b2fe7d3 /drivers/media/pci/saa7146 | |
parent | 625b35229bc491e837b385b7ce1e2a8eece3db0f (diff) |
[media] media: pci: remove duplicate checks for EPERM
This patch removes check for EPERM in dbg_g/s_register and
vidioc_g/s_register as this check is already performed by core.
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/pci/saa7146')
-rw-r--r-- | drivers/media/pci/saa7146/mxb.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/media/pci/saa7146/mxb.c b/drivers/media/pci/saa7146/mxb.c index 71e8bead321b..52cbe7a027cc 100644 --- a/drivers/media/pci/saa7146/mxb.c +++ b/drivers/media/pci/saa7146/mxb.c | |||
@@ -669,8 +669,6 @@ static int vidioc_g_register(struct file *file, void *fh, struct v4l2_dbg_regist | |||
669 | { | 669 | { |
670 | struct saa7146_dev *dev = ((struct saa7146_fh *)fh)->dev; | 670 | struct saa7146_dev *dev = ((struct saa7146_fh *)fh)->dev; |
671 | 671 | ||
672 | if (!capable(CAP_SYS_ADMIN)) | ||
673 | return -EPERM; | ||
674 | if (v4l2_chip_match_host(®->match)) { | 672 | if (v4l2_chip_match_host(®->match)) { |
675 | reg->val = saa7146_read(dev, reg->reg); | 673 | reg->val = saa7146_read(dev, reg->reg); |
676 | reg->size = 4; | 674 | reg->size = 4; |
@@ -684,8 +682,6 @@ static int vidioc_s_register(struct file *file, void *fh, const struct v4l2_dbg_ | |||
684 | { | 682 | { |
685 | struct saa7146_dev *dev = ((struct saa7146_fh *)fh)->dev; | 683 | struct saa7146_dev *dev = ((struct saa7146_fh *)fh)->dev; |
686 | 684 | ||
687 | if (!capable(CAP_SYS_ADMIN)) | ||
688 | return -EPERM; | ||
689 | if (v4l2_chip_match_host(®->match)) { | 685 | if (v4l2_chip_match_host(®->match)) { |
690 | saa7146_write(dev, reg->reg, reg->val); | 686 | saa7146_write(dev, reg->reg, reg->val); |
691 | return 0; | 687 | return 0; |