]> 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 09:16:47 +0000 (11:16 +0200)
commitdb65fea5f0aa2519adfec5efec3441d8bee6ab84
treeeeba2ed838782dc2ef47333e38cf2beacade1679
parent5f2b63a398edf3a0a4fbe03acdf59829487bc4a6
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