diff options
author | Sudip Mukherjee <sudipm.mukherjee@gmail.com> | 2015-09-10 16:48:13 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-10-22 14:49:20 -0700 |
commit | 1bda8dbe4d7c985f4679f094e68b90fdffe67858 (patch) | |
tree | 87d5c7d71c23da78b4bbd8f07234f2420c73b59f /mm/migrate.c | |
parent | 9280d7dc378fe0e7cf750729f02f6ab68b7014e8 (diff) | |
download | lwn-1bda8dbe4d7c985f4679f094e68b90fdffe67858.tar.gz lwn-1bda8dbe4d7c985f4679f094e68b90fdffe67858.zip |
spi: spidev: fix possible NULL dereference
commit dd85ebf681ef0ee1fc985c353dd45e8b53b5dc1e upstream.
During the last close we are freeing spidev if spidev->spi is NULL, but
just before checking if spidev->spi is NULL we are dereferencing it.
Lets add a check there to avoid the NULL dereference.
Fixes: 9169051617df ("spi: spidev: Don't mangle max_speed_hz in underlying spi device")
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Reviewed-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Tested-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'mm/migrate.c')
0 files changed, 0 insertions, 0 deletions