]> Gentwo Git Trees - linux/.git/commit
nvdimm: Clean up __nd_ioctl() and remove gotos
authorDave Jiang <dave.jiang@intel.com>
Tue, 23 Sep 2025 17:40:13 +0000 (10:40 -0700)
committerIra Weiny <ira.weiny@intel.com>
Thu, 25 Sep 2025 17:40:11 +0000 (12:40 -0500)
commit88506435d9d4148e31341a2be9492004df9f7611
tree705f74c33475245891a0c72c3081440f9d113f9c
parent0020839be034cf1c57ebdf8af8c9e4f697055db6
nvdimm: Clean up __nd_ioctl() and remove gotos

Utilize scoped based resource management to clean up the code and
and remove gotos for the __nd_ioctl() function.

Change allocation of 'buf' to use kvzalloc() in order to use
vmalloc() memory when needed and also zero out the allocated
memory.

Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Reviewed-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Ira Weiny <ira.weiny@intel.com>
drivers/nvdimm/bus.c