From 7e89bd9f242930371f89f3d8c32eaf42ea1c74b1 Mon Sep 17 00:00:00 2001 From: "Lad, Prabhakar" Date: Tue, 14 May 2013 01:45:14 -0300 Subject: [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 Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- drivers/media/i2c/ths7303.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'drivers/media/i2c/ths7303.c') diff --git a/drivers/media/i2c/ths7303.c b/drivers/media/i2c/ths7303.c index c4339556a2ea..65853eea09a1 100644 --- a/drivers/media/i2c/ths7303.c +++ b/drivers/media/i2c/ths7303.c @@ -236,8 +236,6 @@ static int ths7303_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; reg->val = ths7303_read(sd, reg->reg); @@ -251,8 +249,6 @@ static int ths7303_s_register(struct v4l2_subdev *sd, if (!v4l2_chip_match_i2c_client(client, ®->match)) return -EINVAL; - if (!capable(CAP_SYS_ADMIN)) - return -EPERM; ths7303_write(sd, reg->reg, reg->val); return 0; -- cgit v1.2.3