[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200604130406.108940-1-efremov@linux.com>
Date: Thu, 4 Jun 2020 16:04:06 +0300
From: Denis Efremov <efremov@...ux.com>
To: "James E.J. Bottomley" <jejb@...ux.ibm.com>
Cc: Denis Efremov <efremov@...ux.com>,
"Martin K. Petersen" <martin.petersen@...cle.com>,
linux-hyperv@...r.kernel.org, linux-scsi@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH] scsi: storvsc: Use kzfree() in storvsc_suspend()
Use kzfree() instead of memset() with 0 followed by kfree().
Signed-off-by: Denis Efremov <efremov@...ux.com>
---
drivers/scsi/storvsc_drv.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c
index 072ed8728657..e5a19cd8a450 100644
--- a/drivers/scsi/storvsc_drv.c
+++ b/drivers/scsi/storvsc_drv.c
@@ -2035,10 +2035,7 @@ static int storvsc_suspend(struct hv_device *hv_dev)
vmbus_close(hv_dev->channel);
- memset(stor_device->stor_chns, 0,
- num_possible_cpus() * sizeof(void *));
-
- kfree(stor_device->stor_chns);
+ kzfree(stor_device->stor_chns);
stor_device->stor_chns = NULL;
cpumask_clear(&stor_device->alloced_cpus);
--
2.26.2
Powered by blists - more mailing lists