]> git.baikalelectronics.ru Git - kernel.git/commit
drm: Fix error handling in drm_legacy_addctx
authorYueHaibing <yuehaibing@huawei.com>
Sat, 29 Dec 2018 02:49:07 +0000 (10:49 +0800)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 7 Jan 2019 10:26:31 +0000 (11:26 +0100)
commitc8894fff8a57980a6c06e879cc9521f7ac75696e
tree7ecf7ff83106a2a7acc9375bda5ecfc8e829b56c
parent5a8741314d55c751194ce37ea9198521625f9d5b
drm: Fix error handling in drm_legacy_addctx

'ctx->handle' is unsigned, it never less than zero.
This patch use int 'tmp_handle' to handle the err condition.

Fixes: 52ceed327f42 ("drm: convert drm context code to use Linux idr")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20181229024907.12852-1-yuehaibing@huawei.com
drivers/gpu/drm/drm_context.c