2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-22 12:14:01 +08:00

media: adv7180: Remove duplicate checks

Since i2c_unregister_device() became NULL-aware we may remove duplicate checks.

Cc: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.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:
Andy Shevchenko 2017-10-31 10:21:48 -04:00 committed by Mauro Carvalho Chehab
parent 85f42985af
commit 297aca189f

View File

@ -1366,10 +1366,8 @@ err_media_entity_cleanup:
err_free_ctrl:
adv7180_exit_controls(state);
err_unregister_vpp_client:
if (state->chip_info->flags & ADV7180_FLAG_I2P)
i2c_unregister_device(state->vpp_client);
err_unregister_csi_client:
if (state->chip_info->flags & ADV7180_FLAG_MIPI_CSI2)
i2c_unregister_device(state->csi_client);
mutex_destroy(&state->mutex);
return ret;
@ -1388,9 +1386,7 @@ static int adv7180_remove(struct i2c_client *client)
media_entity_cleanup(&sd->entity);
adv7180_exit_controls(state);
if (state->chip_info->flags & ADV7180_FLAG_I2P)
i2c_unregister_device(state->vpp_client);
if (state->chip_info->flags & ADV7180_FLAG_MIPI_CSI2)
i2c_unregister_device(state->csi_client);
adv7180_set_power_pin(state, false);