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>
This commit is contained in:
parent
297aca189f
commit
5195978fcb
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user