diff mbox series

scsi: libfc: remove unnecessary assertion on ep variable

Message ID 20191217212214.30722-1-pakki001@umn.edu (mailing list archive)
State Mainlined
Commit 52b894393cecdc303990e834778d39b85d0553fc
Headers show
Series scsi: libfc: remove unnecessary assertion on ep variable | expand

Commit Message

Aditya Pakki Dec. 17, 2019, 9:22 p.m. UTC
In ft_recv_write_data(), the pointer ep is dereferenced first and
then asserts for NULL. The patch removes the unnecessary assertion.

Signed-off-by: Aditya Pakki <pakki001@umn.edu>
---
 drivers/target/tcm_fc/tfc_io.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Hannes Reinecke Dec. 18, 2019, 11:12 a.m. UTC | #1
On 12/17/19 10:22 PM, Aditya Pakki wrote:
> In ft_recv_write_data(), the pointer ep is dereferenced first and
> then asserts for NULL. The patch removes the unnecessary assertion.
> 
> Signed-off-by: Aditya Pakki <pakki001@umn.edu>
> ---
>   drivers/target/tcm_fc/tfc_io.c | 1 -
>   1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/target/tcm_fc/tfc_io.c b/drivers/target/tcm_fc/tfc_io.c
> index 1354a157e9af..6a38ff936389 100644
> --- a/drivers/target/tcm_fc/tfc_io.c
> +++ b/drivers/target/tcm_fc/tfc_io.c
> @@ -221,7 +221,6 @@ void ft_recv_write_data(struct ft_cmd *cmd, struct fc_frame *fp)
>   	ep = fc_seq_exch(seq);
>   	lport = ep->lp;
>   	if (cmd->was_ddp_setup) {
> -		BUG_ON(!ep);
>   		BUG_ON(!lport);
>   		/*
>   		 * Since DDP (Large Rx offload) was setup for this request,
> 
Reviewed-by: Hannes Reinecke <hare@suse.de>

Cheers,

Hannes
Martin K. Petersen Dec. 19, 2019, 11:45 p.m. UTC | #2
Aditya,

> In ft_recv_write_data(), the pointer ep is dereferenced first and
> then asserts for NULL. The patch removes the unnecessary assertion.

Applied to 5.6/scsi-queue, thanks!
diff mbox series

Patch

diff --git a/drivers/target/tcm_fc/tfc_io.c b/drivers/target/tcm_fc/tfc_io.c
index 1354a157e9af..6a38ff936389 100644
--- a/drivers/target/tcm_fc/tfc_io.c
+++ b/drivers/target/tcm_fc/tfc_io.c
@@ -221,7 +221,6 @@  void ft_recv_write_data(struct ft_cmd *cmd, struct fc_frame *fp)
 	ep = fc_seq_exch(seq);
 	lport = ep->lp;
 	if (cmd->was_ddp_setup) {
-		BUG_ON(!ep);
 		BUG_ON(!lport);
 		/*
 		 * Since DDP (Large Rx offload) was setup for this request,