diff options
| author | 2025-09-22 22:18:33 +0200 | |
|---|---|---|
| committer | 2025-09-24 21:41:24 -0400 | |
| commit | 0ac3c901fbeb87d7aaa89e913dbd692dd342c3a8 (patch) | |
| tree | 8995dd07251b73495adde07911af93f5d63f7abe /drivers/cdx/controller/cdx_controller.c | |
| parent | scsi: hpsa: Replace kmalloc() + copy_from_user() with memdup_user() (diff) | |
| download | linux-rng-0ac3c901fbeb87d7aaa89e913dbd692dd342c3a8.tar.xz linux-rng-0ac3c901fbeb87d7aaa89e913dbd692dd342c3a8.zip | |
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 'drivers/cdx/controller/cdx_controller.c')
0 files changed, 0 insertions, 0 deletions
