]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
LoongArch: Check the return value when creating kobj
authorTao Cui <cuitao@kylinos.cn>
Thu, 18 Sep 2025 11:44:04 +0000 (19:44 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Sep 2025 08:58:52 +0000 (10:58 +0200)
commit2605cf87853c59e01ac1c4439cc0ff1d489997d3
treeeb69663adaeb1992b01ac72572678eb7f9880418
parente481c2fd34626b0a9ca41107c7ccddefa60847ef
LoongArch: Check the return value when creating kobj

commit 51adb03e6b865c0c6790f29659ff52d56742de2e upstream.

Add a check for the return value of kobject_create_and_add(), to ensure
that the kobj allocation succeeds for later use.

Cc: stable@vger.kernel.org
Signed-off-by: Tao Cui <cuitao@kylinos.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/loongarch/kernel/env.c