[media] media: dvb-frontends: remove duplicate checks for EPERM in dbg_g/s_register
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>
This commit is contained in:
parent
7e89bd9f24
commit
d5f8fb5b46
@ -529,8 +529,6 @@ static int au8522_g_register(struct v4l2_subdev *sd,
|
||||
|
||||
if (!v4l2_chip_match_i2c_client(client, ®->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, ®->match))
|
||||
return -EINVAL;
|
||||
if (!capable(CAP_SYS_ADMIN))
|
||||
return -EPERM;
|
||||
au8522_writereg(state, reg->reg, reg->val & 0xff);
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user