Skip to content
Snippets Groups Projects
Commit 2c87309e authored by Keisuke Nishimura's avatar Keisuke Nishimura Committed by Stefan Schmidt
Browse files

ieee802154: ca8210: Add missing check for kfifo_alloc() in ca8210_probe()


ca8210_test_interface_init() returns the result of kfifo_alloc(),
which can be non-zero in case of an error. The caller, ca8210_probe(),
should check the return value and do error-handling if it fails.

Fixes: ded845a7 ("ieee802154: Add CA8210 IEEE 802.15.4 device driver")
Signed-off-by: default avatarKeisuke Nishimura <keisuke.nishimura@inria.fr>
Reviewed-by: default avatarSimon Horman <horms@kernel.org>
Reviewed-by: default avatarMiquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/20241029182712.318271-1-keisuke.nishimura@inria.fr


Signed-off-by: default avatarStefan Schmidt <stefan@datenfreihafen.org>
parent 66418447
No related merge requests found
......@@ -3072,7 +3072,11 @@ static int ca8210_probe(struct spi_device *spi_device)
spi_set_drvdata(priv->spi, priv);
if (IS_ENABLED(CONFIG_IEEE802154_CA8210_DEBUGFS)) {
cascoda_api_upstream = ca8210_test_int_driver_write;
ca8210_test_interface_init(priv);
ret = ca8210_test_interface_init(priv);
if (ret) {
dev_crit(&spi_device->dev, "ca8210_test_interface_init failed\n");
goto error;
}
} else {
cascoda_api_upstream = NULL;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment