Commit 07a389fe authored by Roman Tereshonkov's avatar Roman Tereshonkov Committed by Grant Likely

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: default avatarRoman Tereshonkov <roman.tereshonkov@nokia.com>
Signed-off-by: default avatarGrant Likely <grant.likely@secretlab.ca>
parent 8ec130a0
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment