All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] HID: sony: remove redundant check for -ve err
@ 2017-03-27 17:51 ` Colin King
  0 siblings, 0 replies; 6+ messages in thread
From: Colin King @ 2017-03-27 17:51 UTC (permalink / raw)
  To: Jiri Kosina, Benjamin Tissoires, linux-input
  Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

err is being checked for failure each time it is being updated
so this err check is totally redundant and can be removed

Detected with CoverityScan, CID#1420665 ("Logically dead code")

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/hid/hid-sony.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/hid/hid-sony.c b/drivers/hid/hid-sony.c
index bb124e339d26..e3c6fe554056 100644
--- a/drivers/hid/hid-sony.c
+++ b/drivers/hid/hid-sony.c
@@ -2614,9 +2614,6 @@ static int sony_input_configured(struct hid_device *hdev,
 		ret = 0;
 	}
 
-	if (ret < 0)
-		goto err_stop;
-
 	if (sc->quirks & SONY_LED_SUPPORT) {
 		ret = sony_leds_init(sc);
 		if (ret < 0)
-- 
2.11.0

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

* [PATCH] HID: sony: remove redundant check for -ve err
@ 2017-03-27 17:51 ` Colin King
  0 siblings, 0 replies; 6+ messages in thread
From: Colin King @ 2017-03-27 17:51 UTC (permalink / raw)
  To: Jiri Kosina, Benjamin Tissoires, linux-input
  Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

err is being checked for failure each time it is being updated
so this err check is totally redundant and can be removed

Detected with CoverityScan, CID#1420665 ("Logically dead code")

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/hid/hid-sony.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/hid/hid-sony.c b/drivers/hid/hid-sony.c
index bb124e339d26..e3c6fe554056 100644
--- a/drivers/hid/hid-sony.c
+++ b/drivers/hid/hid-sony.c
@@ -2614,9 +2614,6 @@ static int sony_input_configured(struct hid_device *hdev,
 		ret = 0;
 	}
 
-	if (ret < 0)
-		goto err_stop;
-
 	if (sc->quirks & SONY_LED_SUPPORT) {
 		ret = sony_leds_init(sc);
 		if (ret < 0)
-- 
2.11.0


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

* Re: [PATCH] HID: sony: remove redundant check for -ve err
  2017-03-27 17:51 ` Colin King
@ 2017-03-31  9:01   ` Benjamin Tissoires
  -1 siblings, 0 replies; 6+ messages in thread
From: Benjamin Tissoires @ 2017-03-31  9:01 UTC (permalink / raw)
  To: Colin King; +Cc: Jiri Kosina, linux-input, kernel-janitors, linux-kernel

On Mar 27 2017 or thereabouts, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> err is being checked for failure each time it is being updated
> so this err check is totally redundant and can be removed
> 
> Detected with CoverityScan, CID#1420665 ("Logically dead code")
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---

Indeed. Not sure if it will conflict with Roderick's series, but still:

Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>

Cheers,
Benjamin

>  drivers/hid/hid-sony.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/drivers/hid/hid-sony.c b/drivers/hid/hid-sony.c
> index bb124e339d26..e3c6fe554056 100644
> --- a/drivers/hid/hid-sony.c
> +++ b/drivers/hid/hid-sony.c
> @@ -2614,9 +2614,6 @@ static int sony_input_configured(struct hid_device *hdev,
>  		ret = 0;
>  	}
>  
> -	if (ret < 0)
> -		goto err_stop;
> -
>  	if (sc->quirks & SONY_LED_SUPPORT) {
>  		ret = sony_leds_init(sc);
>  		if (ret < 0)
> -- 
> 2.11.0
> 

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

* Re: [PATCH] HID: sony: remove redundant check for -ve err
@ 2017-03-31  9:01   ` Benjamin Tissoires
  0 siblings, 0 replies; 6+ messages in thread
From: Benjamin Tissoires @ 2017-03-31  9:01 UTC (permalink / raw)
  To: Colin King; +Cc: Jiri Kosina, linux-input, kernel-janitors, linux-kernel

On Mar 27 2017 or thereabouts, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> err is being checked for failure each time it is being updated
> so this err check is totally redundant and can be removed
> 
> Detected with CoverityScan, CID#1420665 ("Logically dead code")
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---

Indeed. Not sure if it will conflict with Roderick's series, but still:

Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>

Cheers,
Benjamin

>  drivers/hid/hid-sony.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/drivers/hid/hid-sony.c b/drivers/hid/hid-sony.c
> index bb124e339d26..e3c6fe554056 100644
> --- a/drivers/hid/hid-sony.c
> +++ b/drivers/hid/hid-sony.c
> @@ -2614,9 +2614,6 @@ static int sony_input_configured(struct hid_device *hdev,
>  		ret = 0;
>  	}
>  
> -	if (ret < 0)
> -		goto err_stop;
> -
>  	if (sc->quirks & SONY_LED_SUPPORT) {
>  		ret = sony_leds_init(sc);
>  		if (ret < 0)
> -- 
> 2.11.0
> 

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

* Re: [PATCH] HID: sony: remove redundant check for -ve err
  2017-03-27 17:51 ` Colin King
@ 2017-04-06 18:34   ` Jiri Kosina
  -1 siblings, 0 replies; 6+ messages in thread
From: Jiri Kosina @ 2017-04-06 18:34 UTC (permalink / raw)
  To: Colin King; +Cc: Benjamin Tissoires, linux-input, kernel-janitors, linux-kernel

On Mon, 27 Mar 2017, Colin King wrote:

> From: Colin Ian King <colin.king@canonical.com>
> 
> err is being checked for failure each time it is being updated
> so this err check is totally redundant and can be removed
> 
> Detected with CoverityScan, CID#1420665 ("Logically dead code")
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Applied to for-4.12/sony.

-- 
Jiri Kosina
SUSE Labs

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

* Re: [PATCH] HID: sony: remove redundant check for -ve err
@ 2017-04-06 18:34   ` Jiri Kosina
  0 siblings, 0 replies; 6+ messages in thread
From: Jiri Kosina @ 2017-04-06 18:34 UTC (permalink / raw)
  To: Colin King; +Cc: Benjamin Tissoires, linux-input, kernel-janitors, linux-kernel

On Mon, 27 Mar 2017, Colin King wrote:

> From: Colin Ian King <colin.king@canonical.com>
> 
> err is being checked for failure each time it is being updated
> so this err check is totally redundant and can be removed
> 
> Detected with CoverityScan, CID#1420665 ("Logically dead code")
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Applied to for-4.12/sony.

-- 
Jiri Kosina
SUSE Labs


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

end of thread, other threads:[~2017-04-06 18:34 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-27 17:51 [PATCH] HID: sony: remove redundant check for -ve err Colin King
2017-03-27 17:51 ` Colin King
2017-03-31  9:01 ` Benjamin Tissoires
2017-03-31  9:01   ` Benjamin Tissoires
2017-04-06 18:34 ` Jiri Kosina
2017-04-06 18:34   ` Jiri Kosina

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.