OSDN Git Service

drm/amd/display: Fix static checker warnings on tracebuff_fb
authorLeo (Hanghong) Ma <hanghong.ma@amd.com>
Mon, 15 Mar 2021 22:31:55 +0000 (18:31 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 9 Apr 2021 20:48:02 +0000 (16:48 -0400)
commit6c8e1f3b95a2fb3dbad1fe0f72d2902f34cfb75f
tree2620090a1e229202fc27af2c420ab72bc4d6430e
parent4758823355a0ed90bd9bfec508de41635a75d4d1
drm/amd/display: Fix static checker warnings on tracebuff_fb

[Why]
Static analysis on linux-next has found a potential null pointer
dereference;

[How]
Refactor the function, add ASSERT and remove the unnecessary check.

Signed-off-by: Leo (Hanghong) Ma <hanghong.ma@amd.com>
Reviewed-by: Harry Wentland <Harry.Wentland@amd.com>
Acked-by: Anson Jacob <Anson.Jacob@amd.com>
Tested-by: Dan Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dmub/src/dmub_srv.c