diff options
author | Roman Tereshonkov <roman.tereshonkov@nokia.com> | 2010-04-12 05:56:35 -0400 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2010-04-28 03:17:58 -0400 |
commit | 07a389feefd79d41c8542cf31ce1cf25a1466e2c (patch) | |
tree | 2ec9e6a6a9ea2aabfe38ac8109bbf6b381abf90e /drivers/spi | |
parent | 8ec130a017ebd8b931344edde7013ffb18fa1965 (diff) |
spi: spi_device memory should be released instead of device.
The memory for dev variable is allocated as a part of
spi_device structure memory which the dev belongs to.
Thus when the memory is released the right pointer is used.
Signed-off-by: Roman Tereshonkov <roman.tereshonkov@nokia.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'drivers/spi')
-rw-r--r-- | drivers/spi/spi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index ec429d156a57..b3a1f9259b62 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c | |||
@@ -41,7 +41,7 @@ static void spidev_release(struct device *dev) | |||
41 | spi->master->cleanup(spi); | 41 | spi->master->cleanup(spi); |
42 | 42 | ||
43 | spi_master_put(spi->master); | 43 | spi_master_put(spi->master); |
44 | kfree(dev); | 44 | kfree(spi); |
45 | } | 45 | } |
46 | 46 | ||
47 | static ssize_t | 47 | static ssize_t |