mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-25 23:01:13 -04:00
drm/amd/ras: use IS_ERR() to check thread creation result
Use IS_ERR() to check thread creation result. Signed-off-by: YiPeng Chai <YiPeng.Chai@amd.com> Reviewed-by: Tao Zhou <tao.zhou1@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
committed by
Alex Deucher
parent
db15c49a17
commit
d73289a64e
@@ -248,9 +248,10 @@ int ras_process_init(struct ras_core_context *ras_core)
|
||||
|
||||
ras_proc->ras_process_thread = kthread_run(ras_process_thread,
|
||||
(void *)ras_core, "ras_process_thread");
|
||||
if (!ras_proc->ras_process_thread) {
|
||||
if (IS_ERR(ras_proc->ras_process_thread)) {
|
||||
RAS_DEV_ERR(ras_core->dev, "Failed to create ras_process_thread.\n");
|
||||
ret = -ENOMEM;
|
||||
ret = PTR_ERR(ras_proc->ras_process_thread);
|
||||
ras_proc->ras_process_thread = NULL;
|
||||
goto err;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user