diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2017-10-31 10:21:49 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2017-12-08 10:13:06 -0500 |
commit | 5195978fcbc4be6c16b99498aab56c27e71b2410 (patch) | |
tree | 4d04d8d40878ea0e2abd72267c5f8e4f2c366d4d /drivers/media/i2c/adv748x | |
parent | 297aca189fdfdf12037e4eebc749aa6ebaa84e0e (diff) | |
download | linux-stable-5195978fcbc4be6c16b99498aab56c27e71b2410.tar.gz linux-stable-5195978fcbc4be6c16b99498aab56c27e71b2410.tar.bz2 linux-stable-5195978fcbc4be6c16b99498aab56c27e71b2410.zip |
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.c | 6 |
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) |