linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] video: backlight: tosa_lcd: drop check because i2c_unregister_device() is NULL safe
@ 2019-08-20 15:34 Wolfram Sang
  2019-08-20 16:32 ` Daniel Thompson
  2019-09-02  9:06 ` Lee Jones
  0 siblings, 2 replies; 3+ messages in thread
From: Wolfram Sang @ 2019-08-20 15:34 UTC (permalink / raw)
  To: linux-i2c
  Cc: Wolfram Sang, Lee Jones, Daniel Thompson, Jingoo Han,
	Bartlomiej Zolnierkiewicz, dri-devel, linux-fbdev, linux-kernel

No need to check the argument of i2c_unregister_device() because the
function itself does it.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
Build tested only, buildbot is happy, too.

Please apply to your tree.

 drivers/video/backlight/tosa_lcd.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/video/backlight/tosa_lcd.c b/drivers/video/backlight/tosa_lcd.c
index 65cb7578776f..29af8e27b6e5 100644
--- a/drivers/video/backlight/tosa_lcd.c
+++ b/drivers/video/backlight/tosa_lcd.c
@@ -222,8 +222,7 @@ static int tosa_lcd_remove(struct spi_device *spi)
 {
 	struct tosa_lcd_data *data = spi_get_drvdata(spi);
 
-	if (data->i2c)
-		i2c_unregister_device(data->i2c);
+	i2c_unregister_device(data->i2c);
 
 	tosa_lcd_tg_off(data);
 
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] video: backlight: tosa_lcd: drop check because i2c_unregister_device() is NULL safe
  2019-08-20 15:34 [PATCH] video: backlight: tosa_lcd: drop check because i2c_unregister_device() is NULL safe Wolfram Sang
@ 2019-08-20 16:32 ` Daniel Thompson
  2019-09-02  9:06 ` Lee Jones
  1 sibling, 0 replies; 3+ messages in thread
From: Daniel Thompson @ 2019-08-20 16:32 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-i2c, Lee Jones, Jingoo Han, Bartlomiej Zolnierkiewicz,
	dri-devel, linux-fbdev, linux-kernel

On Tue, Aug 20, 2019 at 05:34:39PM +0200, Wolfram Sang wrote:
> No need to check the argument of i2c_unregister_device() because the
> function itself does it.
> 
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>


> ---
> Build tested only, buildbot is happy, too.
> 
> Please apply to your tree.
> 
>  drivers/video/backlight/tosa_lcd.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/video/backlight/tosa_lcd.c b/drivers/video/backlight/tosa_lcd.c
> index 65cb7578776f..29af8e27b6e5 100644
> --- a/drivers/video/backlight/tosa_lcd.c
> +++ b/drivers/video/backlight/tosa_lcd.c
> @@ -222,8 +222,7 @@ static int tosa_lcd_remove(struct spi_device *spi)
>  {
>  	struct tosa_lcd_data *data = spi_get_drvdata(spi);
>  
> -	if (data->i2c)
> -		i2c_unregister_device(data->i2c);
> +	i2c_unregister_device(data->i2c);
>  
>  	tosa_lcd_tg_off(data);
>  
> -- 
> 2.20.1
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] video: backlight: tosa_lcd: drop check because i2c_unregister_device() is NULL safe
  2019-08-20 15:34 [PATCH] video: backlight: tosa_lcd: drop check because i2c_unregister_device() is NULL safe Wolfram Sang
  2019-08-20 16:32 ` Daniel Thompson
@ 2019-09-02  9:06 ` Lee Jones
  1 sibling, 0 replies; 3+ messages in thread
From: Lee Jones @ 2019-09-02  9:06 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-i2c, Daniel Thompson, Jingoo Han,
	Bartlomiej Zolnierkiewicz, dri-devel, linux-fbdev, linux-kernel

On Tue, 20 Aug 2019, Wolfram Sang wrote:

> No need to check the argument of i2c_unregister_device() because the
> function itself does it.
> 
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> ---
> Build tested only, buildbot is happy, too.
> 
> Please apply to your tree.
> 
>  drivers/video/backlight/tosa_lcd.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)

Applied, thanks.

-- 
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-09-02  9:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-20 15:34 [PATCH] video: backlight: tosa_lcd: drop check because i2c_unregister_device() is NULL safe Wolfram Sang
2019-08-20 16:32 ` Daniel Thompson
2019-09-02  9:06 ` Lee Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).