diff mbox series

scsi: qedf: NULL check before some freeing functions is not needed.

Message ID 1543760930052-271366275-12-diffsplit-thomas@m3y3r.de (mailing list archive)
State Accepted
Commit f3e46ac47e42df29db99e331ad8f39f34789d4e4
Headers show
Series scsi: qedf: NULL check before some freeing functions is not needed. | expand

Commit Message

Thomas Meyer Dec. 2, 2018, 8:52 p.m. UTC
NULL check before some freeing functions is not needed.

Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
---

Comments

Rangankar, Manish Dec. 3, 2018, 5:57 a.m. UTC | #1
> -----Original Message-----
> From: Thomas Meyer <thomas@m3y3r.de>
> Sent: Monday, December 3, 2018 2:22 AM
> To: Dept-Eng QLogic Storage Upstream <QLogic-Storage-
> Upstream@cavium.com>; jejb@linux.vnet.ibm.com;
> martin.petersen@oracle.com; linux-scsi@vger.kernel.org; linux-
> kernel@vger.kernel.org
> Subject: [PATCH] scsi: qedf: NULL check before some freeing functions is not
> needed.
> 
> External Email
> 
> NULL check before some freeing functions is not needed.
> 
> Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
> ---
> 
> diff -u -p a/drivers/scsi/qedf/qedf_main.c b/drivers/scsi/qedf/qedf_main.c
> --- a/drivers/scsi/qedf/qedf_main.c
> +++ b/drivers/scsi/qedf/qedf_main.c
> @@ -2935,8 +2935,7 @@ static void qedf_free_fcoe_pf_param(stru
> 
>         qedf_free_global_queues(qedf);
> 
> -       if (qedf->global_queues)
> -               kfree(qedf->global_queues);
> +       kfree(qedf->global_queues);
>  }
> 
>  /*

Thanks
Acked-by: Manish Rangankar <Manish.Rangankar@cavium.com>
Martin K. Petersen Dec. 8, 2018, 2:41 a.m. UTC | #2
Thomas,

> NULL check before some freeing functions is not needed.

Applied to 4.21/scsi-queue, thanks.
diff mbox series

Patch

diff -u -p a/drivers/scsi/qedf/qedf_main.c b/drivers/scsi/qedf/qedf_main.c
--- a/drivers/scsi/qedf/qedf_main.c
+++ b/drivers/scsi/qedf/qedf_main.c
@@ -2935,8 +2935,7 @@  static void qedf_free_fcoe_pf_param(stru
 
 	qedf_free_global_queues(qedf);
 
-	if (qedf->global_queues)
-		kfree(qedf->global_queues);
+	kfree(qedf->global_queues);
 }
 
 /*