Skip to content

Commit 66c4662

Browse files
Jiapeng Chongalexdeucher
authored andcommitted
amdgpu: remove unreachable code
In the function amdgpu_uvd_cs_msg(), every branch in the switch statement will have a return, so the code below the switch statement will not be executed. Eliminate the follow smatch warning: drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:845 amdgpu_uvd_cs_msg() warn: ignoring unreachable code. Reported-by: Abaci Robot <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Jiapeng Chong <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 8333388 commit 66c4662

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -829,9 +829,8 @@ static int amdgpu_uvd_cs_msg(struct amdgpu_uvd_cs_ctx *ctx,
829829

830830
default:
831831
DRM_ERROR("Illegal UVD message type (%d)!\n", msg_type);
832-
return -EINVAL;
833832
}
834-
BUG();
833+
835834
return -EINVAL;
836835
}
837836

0 commit comments

Comments
 (0)