Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 458ffce1 authored by Neil Armstrong's avatar Neil Armstrong Committed by Mauro Carvalho Chehab
Browse files

media: cxd2880-spi: fix probe when dvb_attach fails



When dvb_attach fails, probe returns 0, and remove crashes afterwards.
This patch sets the return value to -ENODEV when attach fails.

Fixes: bd24fcdd ("media: cxd2880-spi: Add support for CXD2880 SPI interface")

Signed-off-by: default avatarNeil Armstrong <narmstrong@baylibre.com>
Acked-by: default avatarYasunari Takiguchi <Yasunari.Takiguchi@sony.com>
Signed-off-by: default avatarSean Young <sean@mess.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent bac26a63
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -536,6 +536,7 @@ cxd2880_spi_probe(struct spi_device *spi)

	if (!dvb_attach(cxd2880_attach, &dvb_spi->dvb_fe, &config)) {
		pr_err("cxd2880_attach failed\n");
		ret = -ENODEV;
		goto fail_attach;
	}