[PATCH v2 5/7] nvme: Don't clear nvme blk device's priv space

Bin Meng bmeng.cn at gmail.com
Tue Jun 22 15:16:21 CEST 2021


A udevice's priv space is cleared in alloc_priv() in the DM core.
Don't do it again in its probe() routine.

Signed-off-by: Bin Meng <bmeng.cn at gmail.com>

---

Changes in v2:
- new patch: Don't clear nvme blk device's priv space

 drivers/nvme/nvme.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/nvme/nvme.c b/drivers/nvme/nvme.c
index e2e13dbf66..0527198aa6 100644
--- a/drivers/nvme/nvme.c
+++ b/drivers/nvme/nvme.c
@@ -706,7 +706,6 @@ static int nvme_blk_probe(struct udevice *udev)
 	if (!id)
 		return -ENOMEM;
 
-	memset(ns, 0, sizeof(*ns));
 	ns->dev = ndev;
 	/* extract the namespace id from the block device name */
 	ns->ns_id = trailing_strtol(udev->name);
-- 
2.25.1



More information about the U-Boot mailing list