summaryrefslogtreecommitdiff
path: root/rust/helpers
diff options
context:
space:
mode:
authorThorsten Blum <thorsten.blum@linux.dev>2025-09-22 22:18:33 +0200
committerMartin K. Petersen <martin.petersen@oracle.com>2025-09-24 21:41:24 -0400
commit0ac3c901fbeb87d7aaa89e913dbd692dd342c3a8 (patch)
tree8995dd07251b73495adde07911af93f5d63f7abe /rust/helpers
parentac01fc418f586c6a6e5582da16de7324e9c6391a (diff)
scsi: smartpqi: Replace kmalloc() + copy_from_user() with memdup_user()
Replace kmalloc() followed by copy_from_user() with memdup_user() to simplify and improve pqi_passthru_ioctl(). Since memdup_user() already allocates memory, use kzalloc() in the else branch instead of manually zeroing 'kernel_buffer' using memset(0). Return early if an error occurs. No functional changes intended. Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Acked-by: Don Brace <don.brace@microchip.com> Message-Id: <20250922201832.1697874-2-thorsten.blum@linux.dev> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'rust/helpers')
0 files changed, 0 insertions, 0 deletions