drm/amdgpu: debugfs: fix NULL dereference in ta_if_invoke_debugfs_write()
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 26 Apr 2022 08:49:20 +0000 (11:49 +0300)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 26 Apr 2022 15:52:57 +0000 (11:52 -0400)
commit2f33a397e9605e70fe2082d727aa1501a9386b95
treefe32be1f9d186703539f6a009cce6a691f0cb5e6
parenta52ad5b6ce0df125d0d9ea169b61ae6cc098f047
drm/amdgpu: debugfs: fix NULL dereference in ta_if_invoke_debugfs_write()

If the kzalloc() fails then this code will crash.  Return -ENOMEM instead.

Fixes: e50d9ba0d2cd ("drm/amdgpu: Add debugfs TA load/unload/invoke support")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_psp_ta.c