From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: Jonathan Cameron <jic23@kernel.org>
Cc: Felipe Balbi <balbi@ti.com>,
linux-iio@vger.kernel.org,
Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
Lars-Peter Clausen <lars@metafoo.de>
Subject: [PATCH 1/2] iio: adc: ti_am335x_adc: do not free the kfifo twice
Date: Wed, 23 Oct 2013 19:00:23 +0200 [thread overview]
Message-ID: <1382547624-15256-1-git-send-email-bigeasy@linutronix.de> (raw)
Since commit 9e69c9 ("iio: Add reference counting for buffers") the iio
core frees the buffer. So if the driver does it as well then bad things
will happen.
Cc: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
By no means I am the expert here but the other users of iio_kfifo_free() like
drivers/iio/industrialio-triggered-buffer.c: iio_kfifo_free(indio_dev->buffer);
drivers/iio/industrialio-triggered-buffer.c: iio_kfifo_free(indio_dev->buffer);
are probably wrong, too. Not to mention staging. So *I* think iio_kfifo_free()
should vanish from the tree.
drivers/iio/adc/ti_am335x_adc.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/iio/adc/ti_am335x_adc.c b/drivers/iio/adc/ti_am335x_adc.c
index f974dea..3d70f09 100644
--- a/drivers/iio/adc/ti_am335x_adc.c
+++ b/drivers/iio/adc/ti_am335x_adc.c
@@ -254,8 +254,6 @@ static int tiadc_iio_buffered_hardware_setup(struct iio_dev *indio_dev,
error_free_irq:
free_irq(irq, indio_dev);
-error_kfifo_free:
- iio_kfifo_free(indio_dev->buffer);
return ret;
}
@@ -264,7 +262,6 @@ static void tiadc_iio_buffered_hardware_remove(struct iio_dev *indio_dev)
struct tiadc_device *adc_dev = iio_priv(indio_dev);
free_irq(adc_dev->mfd_tscadc->irq, indio_dev);
- iio_kfifo_free(indio_dev->buffer);
iio_buffer_unregister(indio_dev);
}
--
1.8.4.rc3
next reply other threads:[~2013-10-23 17:00 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-23 17:00 Sebastian Andrzej Siewior [this message]
2013-10-23 17:00 ` [PATCH 2 / 2] iio: ti_am335x_adc: adjust the closing bracket in tiadc_read_raw() Sebastian Andrzej Siewior
2013-10-23 19:36 ` [PATCH 1/2 v2] iio: adc: ti_am335x_adc: do not free the kfifo twice Sebastian Andrzej Siewior
2013-10-23 23:04 ` Jonathan Cameron
-- strict thread matches above, loose matches on Subject: below --
2013-10-23 17:44 [PATCH 1/2] " Lars-Peter Clausen
2013-10-24 10:13 ` Jonathan Cameron
2013-10-24 9:25 ` Sebastian Andrzej Siewior
2013-10-24 9:41 ` Lars-Peter Clausen
2013-10-24 10:34 ` Sebastian Andrzej Siewior
2013-10-24 10:44 ` Lars-Peter Clausen
2013-10-24 10:51 ` Sebastian Andrzej Siewior
2013-10-24 11:50 ` Jonathan Cameron
2013-11-09 12:34 ` Jonathan Cameron
2013-11-10 9:37 ` Lars-Peter Clausen
2013-11-10 11:31 ` Jonathan Cameron
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1382547624-15256-1-git-send-email-bigeasy@linutronix.de \
--to=bigeasy@linutronix.de \
--cc=balbi@ti.com \
--cc=jic23@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).