summaryrefslogtreecommitdiff
path: root/drivers/media/i2c/adv748x
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2017-10-31 10:21:49 -0400
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2017-12-08 10:13:06 -0500
commit5195978fcbc4be6c16b99498aab56c27e71b2410 (patch)
tree4d04d8d40878ea0e2abd72267c5f8e4f2c366d4d /drivers/media/i2c/adv748x
parent297aca189fdfdf12037e4eebc749aa6ebaa84e0e (diff)
downloadlinux-5195978fcbc4be6c16b99498aab56c27e71b2410.tar.gz
media: i2c: adv748x: Remove duplicate NULL check
Since i2c_unregister_device() became NULL-aware we may remove duplicate NULL check. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/i2c/adv748x')
-rw-r--r--drivers/media/i2c/adv748x/adv748x-core.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/media/i2c/adv748x/adv748x-core.c b/drivers/media/i2c/adv748x/adv748x-core.c
index 5ee14f2c2747..10c3d469175c 100644
--- a/drivers/media/i2c/adv748x/adv748x-core.c
+++ b/drivers/media/i2c/adv748x/adv748x-core.c
@@ -225,10 +225,8 @@ static void adv748x_unregister_clients(struct adv748x_state *state)
{
unsigned int i;
- for (i = 1; i < ARRAY_SIZE(state->i2c_clients); ++i) {
- if (state->i2c_clients[i])
- i2c_unregister_device(state->i2c_clients[i]);
- }
+ for (i = 1; i < ARRAY_SIZE(state->i2c_clients); ++i)
+ i2c_unregister_device(state->i2c_clients[i]);
}
static int adv748x_initialise_clients(struct adv748x_state *state)