Commit 66c46621 authored by Jiapeng Chong's avatar Jiapeng Chong Committed by Alex Deucher
Browse files

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: default avatarAbaci Robot <abaci@linux.alibaba.com>
Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
Signed-off-by: default avatarJiapeng Chong <jiapeng.chong@linux.alibaba.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 8333388b
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -829,9 +829,8 @@ static int amdgpu_uvd_cs_msg(struct amdgpu_uvd_cs_ctx *ctx,

	default:
		DRM_ERROR("Illegal UVD message type (%d)!\n", msg_type);
		return -EINVAL;
	}
	BUG();

	return -EINVAL;
}