]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
tools/iio: Add memory allocation failure check for trigger_name
authorZhu Jun <zhujun2@cmss.chinamobile.com>
Wed, 28 Aug 2024 09:31:29 +0000 (02:31 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Oct 2024 13:11:52 +0000 (15:11 +0200)
commit59eba86b811bd9edc94ee088bff39171fc01c2b8
treebf35af6221100eff318e613eed78820dc97ad11e
parent9a2bc9b6f929a2ce1ebe4d1a796ddab37568c5b4
tools/iio: Add memory allocation failure check for trigger_name

[ Upstream commit 3c6b818b097dd6932859bcc3d6722a74ec5931c1 ]

Added a check to handle memory allocation failure for `trigger_name`
and return `-ENOMEM`.

Signed-off-by: Zhu Jun <zhujun2@cmss.chinamobile.com>
Link: https://patch.msgid.link/20240828093129.3040-1-zhujun2@cmss.chinamobile.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
tools/iio/iio_generic_buffer.c