[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <02699364973B424C83A42A84B04FDA850B32C7AC@JPYOKXMS113.jp.sony.com>
Date: Tue, 13 Nov 2018 05:13:20 +0000
From: <Yasunari.Takiguchi@...y.com>
To: <narmstrong@...libre.com>
CC: <mchehab@...nel.org>, <linux-media@...r.kernel.org>,
<linux-kernel@...r.kernel.org>
Subject: RE: [PATCH] media: cxd2880-spi: fix probe when dvb_attach fails
Hi Neil,
Thanks for finding that.
Acked-by: Yasunari Takiguchi <Yasunari.Takiguchi@...y.com>
> -----Original Message-----
> From: Neil Armstrong [mailto:narmstrong@...libre.com]
> Sent: Thursday, November 8, 2018 9:45 PM
> To: Takiguchi, Yasunari (SSS)
> Cc: Neil Armstrong; mchehab@...nel.org; linux-media@...r.kernel.org;
> linux-kernel@...r.kernel.org
> Subject: [PATCH] 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: bd24fcddf6b8 ("media: cxd2880-spi: Add support for CXD2880 SPI
> interface")
> Signed-off-by: Neil Armstrong <narmstrong@...libre.com>
> ---
> drivers/media/spi/cxd2880-spi.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/media/spi/cxd2880-spi.c
> b/drivers/media/spi/cxd2880-spi.c
> index 11ce510..c437309 100644
> --- a/drivers/media/spi/cxd2880-spi.c
> +++ b/drivers/media/spi/cxd2880-spi.c
> @@ -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;
> }
>
> --
> 2.7.4
Powered by blists - more mailing lists