[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <98a19634-b2a8-bd09-e9cd-92af432ba525@mev.co.uk>
Date: Mon, 9 Oct 2017 10:22:07 +0100
From: Ian Abbott <abbotti@....co.uk>
To: Arvind Yadav <arvind.yadav.cs@...il.com>,
hsweeten@...ionengravers.com, gregkh@...uxfoundation.org
Cc: devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] staging: comedi: dt282x: fix IRQ assignment for
dev->irq.
On 06/10/17 19:25, Arvind Yadav wrote:
> Here, dev->irq is not assigned with irq. comedi_legacy_detach()
> is using dev->irq for release irq and dt282x_attach() is using dev->irq
> for initialize comedi_subdevice.
>
> Signed-off-by: Arvind Yadav <arvind.yadav.cs@...il.com>
> ---
> changes in v2:
> comedi_isadma_alloc() can fail. adding dev->irq assignment after
> successful return of comedi_isadma_alloc().
>
> drivers/staging/comedi/drivers/dt282x.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/staging/comedi/drivers/dt282x.c b/drivers/staging/comedi/drivers/dt282x.c
> index d5295bb..217a4b8 100644
> --- a/drivers/staging/comedi/drivers/dt282x.c
> +++ b/drivers/staging/comedi/drivers/dt282x.c
> @@ -1062,6 +1062,8 @@ static void dt282x_alloc_dma(struct comedi_device *dev,
> PAGE_SIZE, 0);
> if (!devpriv->dma)
> free_irq(irq_num, dev);
> + else
> + dev->irq = irq_num;
> }
>
> static void dt282x_free_dma(struct comedi_device *dev)
>
Good catch. Thanks!
Reviewed-by: Ian Abbott <abbotti@....co.uk>
--
-=( Ian Abbott @ MEV Ltd. E-mail: <abbotti@....co.uk> )=-
-=( Web: http://www.mev.co.uk/ )=-
Powered by blists - more mailing lists