diff mbox series

[v3,01/48] scsi: ips: Remove an unreachable statement

Message ID 20220211223247.14369-2-bvanassche@acm.org
State Superseded
Headers show
Series Remove the SCSI pointer from struct scsi_cmnd | expand

Commit Message

Bart Van Assche Feb. 11, 2022, 10:32 p.m. UTC
Whether or not CONFIG_BUG is enabled, BUG() never returns. Hence, code past
a BUG() statement is unreachable. Remove one such unreachable statement.

Cc: Hannes Reinecke <hare@suse.com>
Cc: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Cc: John Garry <john.garry@huawei.com>
Cc: Himanshu Madhani <himanshu.madhani@oracle.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
 drivers/scsi/ips.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Hannes Reinecke Feb. 14, 2022, 9:40 a.m. UTC | #1
On 2/11/22 23:32, Bart Van Assche wrote:
> Whether or not CONFIG_BUG is enabled, BUG() never returns. Hence, code past
> a BUG() statement is unreachable. Remove one such unreachable statement.
> 
> Cc: Hannes Reinecke <hare@suse.com>
> Cc: Johannes Thumshirn <johannes.thumshirn@wdc.com>
> Cc: John Garry <john.garry@huawei.com>
> Cc: Himanshu Madhani <himanshu.madhani@oracle.com>
> Signed-off-by: Bart Van Assche <bvanassche@acm.org>
> ---
>   drivers/scsi/ips.c | 1 -
>   1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/scsi/ips.c b/drivers/scsi/ips.c
> index 498bf04499ce..0db35e97ce8f 100644
> --- a/drivers/scsi/ips.c
> +++ b/drivers/scsi/ips.c
> @@ -655,7 +655,6 @@ ips_release(struct Scsi_Host *sh)
>   		printk(KERN_WARNING
>   		       "(%s) release, invalid Scsi_Host pointer.\n", ips_name);
>   		BUG();
> -		return (FALSE);
>   	}
>   
>   	ha = IPS_HA(sh);
> 
Reviewed-by: Hannes Reinecke <hare@suse.de>

Cheers,

Hannes
Himanshu Madhani Feb. 14, 2022, 7:59 p.m. UTC | #2
> On Feb 11, 2022, at 2:32 PM, Bart Van Assche <bvanassche@acm.org> wrote:
> 
> Whether or not CONFIG_BUG is enabled, BUG() never returns. Hence, code past
> a BUG() statement is unreachable. Remove one such unreachable statement.
> 
> Cc: Hannes Reinecke <hare@suse.com>
> Cc: Johannes Thumshirn <johannes.thumshirn@wdc.com>
> Cc: John Garry <john.garry@huawei.com>
> Cc: Himanshu Madhani <himanshu.madhani@oracle.com>
> Signed-off-by: Bart Van Assche <bvanassche@acm.org>
> ---
> drivers/scsi/ips.c | 1 -
> 1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/scsi/ips.c b/drivers/scsi/ips.c
> index 498bf04499ce..0db35e97ce8f 100644
> --- a/drivers/scsi/ips.c
> +++ b/drivers/scsi/ips.c
> @@ -655,7 +655,6 @@ ips_release(struct Scsi_Host *sh)
> 		printk(KERN_WARNING
> 		       "(%s) release, invalid Scsi_Host pointer.\n", ips_name);
> 		BUG();
> -		return (FALSE);
> 	}
> 
> 	ha = IPS_HA(sh);

Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>

--
Himanshu Madhani	 Oracle Linux Engineering
diff mbox series

Patch

diff --git a/drivers/scsi/ips.c b/drivers/scsi/ips.c
index 498bf04499ce..0db35e97ce8f 100644
--- a/drivers/scsi/ips.c
+++ b/drivers/scsi/ips.c
@@ -655,7 +655,6 @@  ips_release(struct Scsi_Host *sh)
 		printk(KERN_WARNING
 		       "(%s) release, invalid Scsi_Host pointer.\n", ips_name);
 		BUG();
-		return (FALSE);
 	}
 
 	ha = IPS_HA(sh);