[media] media: dvb-frontends: remove duplicate checks for EPERM in dbg_g/s_register
authorLad, Prabhakar <prabhakar.csengg@gmail.com>
Tue, 14 May 2013 04:45:15 +0000 (01:45 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Mon, 27 May 2013 12:34:20 +0000 (09:34 -0300)
This patch removes check for EPERM in dbg_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>
drivers/media/dvb-frontends/au8522_decoder.c

index 2099f21e374d6cdf4388d66e8adbc2da43460271..9d159b48e50b859ec2f06c382f55c452ae580c69 100644 (file)
@@ -529,8 +529,6 @@ static int au8522_g_register(struct v4l2_subdev *sd,
 
        if (!v4l2_chip_match_i2c_client(client, &reg->match))
                return -EINVAL;
-       if (!capable(CAP_SYS_ADMIN))
-               return -EPERM;
        reg->val = au8522_readreg(state, reg->reg & 0xffff);
        return 0;
 }
@@ -543,8 +541,6 @@ static int au8522_s_register(struct v4l2_subdev *sd,
 
        if (!v4l2_chip_match_i2c_client(client, &reg->match))
                return -EINVAL;
-       if (!capable(CAP_SYS_ADMIN))
-               return -EPERM;
        au8522_writereg(state, reg->reg, reg->val & 0xff);
        return 0;
 }