iio: backend: fix wrong pointer passed to IS_ERR()

[ Upstream commit fa4076314480bcb2bb32051027735b1cde07eea2 ]

It should be fwnode_back passed to IS_ERR().

Fixes: c464cc610f ("iio: add child nodes support in iio backend framework")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://patch.msgid.link/20241028135215.1549-1-yangyingliang@huaweicloud.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
Yang Yingliang
2024-10-28 21:52:15 +08:00
committed by Greg Kroah-Hartman
parent 00ded066e7
commit 542c273e87
+2 -2
View File
@@ -737,8 +737,8 @@ static struct iio_backend *__devm_iio_backend_fwnode_get(struct device *dev, con
}
fwnode_back = fwnode_find_reference(fwnode, "io-backends", index);
if (IS_ERR(fwnode))
return dev_err_cast_probe(dev, fwnode,
if (IS_ERR(fwnode_back))
return dev_err_cast_probe(dev, fwnode_back,
"Cannot get Firmware reference\n");
guard(mutex)(&iio_back_lock);