gpudev: manage null parameters in memory functions
authorElena Agostini <eagostini@nvidia.com>
Tue, 23 Nov 2021 00:42:07 +0000 (00:42 +0000)
committerThomas Monjalon <thomas@monjalon.net>
Wed, 24 Nov 2021 08:38:43 +0000 (09:38 +0100)
commit1674c56dc30d0faacc642c40ff308c3944184564
treeae411db589bfee886d4530daf4159e273a47a8ae
parent0c6e27549c03695f85d949f5195a166b449b419c
gpudev: manage null parameters in memory functions

The gpudev functions free, register and unregister
return gracefully if input pointer is NULL or size 0,
as API doc was indicating no-op accepted values.

CUDA driver checks are removed because redundant
with the checks added in gpudev library.

Fixes: e818c4e2bf50 ("gpudev: add memory API")

Signed-off-by: Elena Agostini <eagostini@nvidia.com>
drivers/gpu/cuda/cuda.c
lib/gpudev/gpudev.c