Skip to content

Commit

Permalink
spi: spi_device memory should be released instead of device.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Roman Tereshonkov authored and Grant Likely committed Apr 28, 2010
1 parent 8ec130a commit 07a389f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/spi/spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 07a389f

Please sign in to comment.