Skip to content

Commit

Permalink
spi/doc: spi_master_put must be followed up by kfree
Browse files Browse the repository at this point in the history
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
  • Loading branch information
Uwe Kleine-König authored and Grant Likely committed Mar 9, 2012
1 parent 8f53602 commit eb4af0f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/spi/spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -830,7 +830,8 @@ static struct class spi_master_class = {
*
* The caller is responsible for assigning the bus number and initializing
* the master's methods before calling spi_register_master(); and (after errors
* adding the device) calling spi_master_put() to prevent a memory leak.
* adding the device) calling spi_master_put() and kfree() to prevent a memory
* leak.
*/
struct spi_master *spi_alloc_master(struct device *dev, unsigned size)
{
Expand Down

0 comments on commit eb4af0f

Please sign in to comment.