mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-03 23:58:05 +00:00
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>
This commit is contained in:
parent
8ec130a017
commit
07a389feef
1 changed files with 1 additions and 1 deletions
|
@ -41,7 +41,7 @@ static void spidev_release(struct device *dev)
|
|||
spi->master->cleanup(spi);
|
||||
|
||||
spi_master_put(spi->master);
|
||||
kfree(dev);
|
||||
kfree(spi);
|
||||
}
|
||||
|
||||
static ssize_t
|
||||
|
|
Loading…
Reference in a new issue