[media] media: i2c: remove duplicate checks for EPERM in dbg_g/s_register
This patch removes check for EPERM in dbg_g/s_register of subdevice drivers 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:

committed by
Mauro Carvalho Chehab

parent
39cc029f9c
commit
7e89bd9f24
@@ -647,8 +647,6 @@ static int adv7604_g_register(struct v4l2_subdev *sd,
|
||||
|
||||
if (!v4l2_chip_match_i2c_client(client, ®->match))
|
||||
return -EINVAL;
|
||||
if (!capable(CAP_SYS_ADMIN))
|
||||
return -EPERM;
|
||||
reg->size = 1;
|
||||
switch (reg->reg >> 8) {
|
||||
case 0:
|
||||
@@ -705,8 +703,6 @@ static int adv7604_s_register(struct v4l2_subdev *sd,
|
||||
|
||||
if (!v4l2_chip_match_i2c_client(client, ®->match))
|
||||
return -EINVAL;
|
||||
if (!capable(CAP_SYS_ADMIN))
|
||||
return -EPERM;
|
||||
switch (reg->reg >> 8) {
|
||||
case 0:
|
||||
io_write(sd, reg->reg & 0xff, reg->val & 0xff);
|
||||
|
Reference in New Issue
Block a user