Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp1287153ybg; Thu, 4 Jun 2020 06:06:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxTWf0LdfV0nqItmrQK2CoSDYTfuGQTBevfLNSNmWgz9eQB1ZDZcQmZT0Ctev3+BCbZYhZJ X-Received: by 2002:a17:906:528b:: with SMTP id c11mr3661145ejm.407.1591276013343; Thu, 04 Jun 2020 06:06:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591276013; cv=none; d=google.com; s=arc-20160816; b=hD+O1F+JdIiH4UDToK3UHqU739HojVm36cHVzgzTKvv/v2D8LMxPu7o8EWr2cVuaHd 1SIvIxHcJE62isZ2EbK2wUWPF7rRxvEB0qVN1Jvz3TmBNut/1krzqjy1xxNpurYL3CFf uejtC3G2wGOeMsUpISzRPR3eE/6i56sjbOJ+jsLAgTE4GHtW3t5j3yCFDldhqkhGejfj lneOZwVJLLFeaxL1+msrqKcmN1qOZHEq9CVDdIpwoO+TwopbrXhqX3djJayPQuMQwf4F CtsH4Ed+lPhcW/R+lPmw7mmy4M88pY7dWkhooLAuOjkxlcpRX7sCxVUrHdwKe2rd1XWv Sheg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=urAgIqbBzqYwYgj9xnwgXf8/6DMJC8c4LD5osGdOhLY=; b=dLMykJ0w06snzbFIC3maKWWGI4lpgzlKOa/Z64HSgny9QrrzDKHg0uUu8yS38WrAwf 8YwT/+x8gEaPgpmogzF0G6FgXLGSO5668yPHY62JxJ5ApvqXsuaLi83KIY9LODzG3HYh yafgpNf/YSFYTUNM9gdoa63XwE2oZ6vonTUdmYEk06iNFZ9V+2LP1+3bGPGOeUlSNjjw MJyMRt70z6Z1C1ByWJGVkDM9/a3Qz+umdO91vGBl7hWBQajJeFXY/TeuJFEzVFbIZz4n At6AMv1mnTxmmQbVlbWUh6li7U7D0N8Fyd9YttNTL/Lgc0YaxwyO27D5B52sUVrYIn5K IhNw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l2si1345989ejg.443.2020.06.04.06.06.27; Thu, 04 Jun 2020 06:06:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727850AbgFDNER (ORCPT + 99 others); Thu, 4 Jun 2020 09:04:17 -0400 Received: from mail-lf1-f66.google.com ([209.85.167.66]:45752 "EHLO mail-lf1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725926AbgFDNEQ (ORCPT ); Thu, 4 Jun 2020 09:04:16 -0400 Received: by mail-lf1-f66.google.com with SMTP id d7so3529461lfi.12; Thu, 04 Jun 2020 06:04:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=urAgIqbBzqYwYgj9xnwgXf8/6DMJC8c4LD5osGdOhLY=; b=jvDyhezTeyAmzAK5lCkTlrCy7erWTXtpWKTbpo/Cy9ZKxGjRsWEanXZkG3fH9o6Vhi sIL2nGJfjQVhiYWVDLnISzWSNNbUVJ1sg/a3xFyHxRfOVlTxWZFPKuHCJAObleiWDSbs fy1pYykh2NmSx5BI7VMmgDToz+x5HgusEKE9gxyjiX0jWGDAJM3yew4zLIG0TYSdySo0 iw/JpemDtQo/8S1euYgaOVYnRkPSX3KH47qhrI+qtcXsuBZvZcG6fuTdd166uq1DhVpm JgtA9zWr11JgXGGzSocBww8Thml+VkuMG9vp9LSkHswZzmQU6yfrDyRgMWjUfFjIMnNA lP+g== X-Gm-Message-State: AOAM530428NUfkW+Yh/MG7S2mlMcjLz+cAim2fV5I3xV/AFciHLE27nk jhVrabIrQyjP51614z3WfdI= X-Received: by 2002:a19:4854:: with SMTP id v81mr2467234lfa.189.1591275854710; Thu, 04 Jun 2020 06:04:14 -0700 (PDT) Received: from localhost.localdomain (broadband-37-110-38-130.ip.moscow.rt.ru. [37.110.38.130]) by smtp.googlemail.com with ESMTPSA id h13sm1181611ljc.129.2020.06.04.06.04.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Jun 2020 06:04:14 -0700 (PDT) From: Denis Efremov To: "James E.J. Bottomley" Cc: Denis Efremov , "Martin K. Petersen" , linux-hyperv@vger.kernel.org, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] scsi: storvsc: Use kzfree() in storvsc_suspend() Date: Thu, 4 Jun 2020 16:04:06 +0300 Message-Id: <20200604130406.108940-1-efremov@linux.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use kzfree() instead of memset() with 0 followed by kfree(). Signed-off-by: Denis Efremov --- 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