Commit 5195978f authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Mauro Carvalho Chehab

media: i2c: adv748x: Remove duplicate NULL check

Since i2c_unregister_device() became NULL-aware we may remove duplicate
NULL check.
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: default avatarKieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent 297aca18
...@@ -225,10 +225,8 @@ static void adv748x_unregister_clients(struct adv748x_state *state) ...@@ -225,10 +225,8 @@ static void adv748x_unregister_clients(struct adv748x_state *state)
{ {
unsigned int i; unsigned int i;
for (i = 1; i < ARRAY_SIZE(state->i2c_clients); ++i) { for (i = 1; i < ARRAY_SIZE(state->i2c_clients); ++i)
if (state->i2c_clients[i]) i2c_unregister_device(state->i2c_clients[i]);
i2c_unregister_device(state->i2c_clients[i]);
}
} }
static int adv748x_initialise_clients(struct adv748x_state *state) static int adv748x_initialise_clients(struct adv748x_state *state)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment