Commit a0c3652caa357b8f4e76efe401646ef298483cd9

Authored by Guenter Roeck
Committed by Mark Brown
1 parent 6887237cd7

spi: spi-coldfire-qspi: Drop extra spi_master_put in device remove function

The call sequence spi_alloc_master/spi_register_master/spi_unregister_master is
complete; it reduces the device reference count to zero, which and results in
device memory being freed. The subsequent call to spi_master_put is unnecessary
and results in an access to free memory. Drop it.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>

Showing 1 changed file with 0 additions and 1 deletions Side-by-side Diff

drivers/spi/spi-coldfire-qspi.c
... ... @@ -533,7 +533,6 @@
533 533 iounmap(mcfqspi->iobase);
534 534 release_mem_region(res->start, resource_size(res));
535 535 spi_unregister_master(master);
536   - spi_master_put(master);
537 536  
538 537 return 0;
539 538 }