lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-id: <000901ce0f41$30a23230$91e69690$%han@samsung.com>
Date:	Wed, 20 Feb 2013 17:06:30 +0900
From:	Jingoo Han <jg1.han@...sung.com>
To:	'Dmitry Torokhov' <dmitry.torokhov@...il.com>
Cc:	'Samuel Ortiz' <sameo@...ux.intel.com>,
	linux-kernel@...r.kernel.org, 'Jingoo Han' <jg1.han@...sung.com>
Subject: Re: [PATCH 08/11] mfd: ezx-pcap: use devm_request_irq() and
 devm_kzalloc()

On Wednesday, February 20, 2013 4:34 PM, Dmitry Torokhov wrote:
> 
> On Wed, Feb 20, 2013 at 03:13:06PM +0900, Jingoo Han wrote:
> > Use devm_request_irq() and devm_kzalloc() to make cleanup paths
> > more simple.
> >
> > Signed-off-by: Jingoo Han <jg1.han@...sung.com>
> > ---
> >  drivers/mfd/ezx-pcap.c |   16 +++++-----------
> >  1 files changed, 5 insertions(+), 11 deletions(-)
> >
> > diff --git a/drivers/mfd/ezx-pcap.c b/drivers/mfd/ezx-pcap.c
> > index b7a61f0..8dea3a9 100644
> > --- a/drivers/mfd/ezx-pcap.c
> > +++ b/drivers/mfd/ezx-pcap.c
> > @@ -403,7 +403,6 @@ static int ezx_pcap_remove(struct spi_device *spi)
> >  	/* cleanup ADC */
> >  	adc_irq = pcap_to_irq(pcap, (pdata->config & PCAP_SECOND_PORT) ?
> >  				PCAP_IRQ_ADCDONE2 : PCAP_IRQ_ADCDONE);
> > -	free_irq(adc_irq, pcap);
> >  	mutex_lock(&pcap->adc_mutex);
> >  	for (i = 0; i < PCAP_ADC_MAXQ; i++)
> >  		kfree(pcap->adc_queue[i]);
> > @@ -415,8 +414,6 @@ static int ezx_pcap_remove(struct spi_device *spi)
> >
> >  	destroy_workqueue(pcap->workqueue);
> >
> > -	kfree(pcap);
> > -
> 
> I am pretty sure this conversion is wrong as well. Pretty much
> work/workqueue and devm_request_irq() do not mix.

Yes, you're right. 
I will use devm_free_irq().

> 
> Thanks.
> 
> --
> Dmitry

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ