Hi Andy,

Thankyou for the patch.

On 31/10/17 14:21, Andy Shevchenko wrote:
> Since i2c_unregister_device() became NULL-aware we may remove duplicate
> NULL check.
> 
> Cc: Kieran Bingham <kieran.bing...@ideasonboard.com>
> Cc: Mauro Carvalho Chehab <mche...@kernel.org>
> Cc: linux-media@vger.kernel.org
> Signed-off-by: Andy Shevchenko <andriy.shevche...@linux.intel.com>

Acked-by: Kieran Bingham <kieran.bingham+rene...@ideasonboard.com>

> ---
>  drivers/media/i2c/adv748x/adv748x-core.c | 6 ++----
>  1 file 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)
> 

Reply via email to