diff options
| author | Jesper Juhl <[email protected]> | 2012-03-23 00:08:34 +0000 |
|---|---|---|
| committer | Matthew Garrett <[email protected]> | 2012-03-26 19:45:32 +0000 |
| commit | 41603e9783a24c8c7cce548c0819bdc9e46a585b (patch) | |
| tree | d309d27fd11f922cb20cab809ac3db9096ff2377 /lib/mpi/mpi-scan.c | |
| parent | samsung-laptop: unregister ACPI video module for some well known laptops (diff) | |
| download | kernel-41603e9783a24c8c7cce548c0819bdc9e46a585b.tar.gz kernel-41603e9783a24c8c7cce548c0819bdc9e46a585b.zip | |
drivers/platform/x86/amilo-rfkill.c::amilo_rfkill_probe() avoid NULL deref
In drivers/platform/x86/amilo-rfkill.c::amilo_rfkill_probe() the call
to dmi_first_match() may fail and return NULL. If it does return NULL,
then we'll be dereferencing a NULL pointer in the rfkill_alloc() call
where we do 'system_id->driver_data' --> KABOOM!
Avoid that problem by testing for a NULL return value from
dmi_first_match() and bailing out if it fails.
I was a bit uncertain about what to return in the failure case. In the
end I settled for -ENXIO as the most logical error to return.
Signed-off-by: Jesper Juhl <[email protected]>
Signed-off-by: Matthew Garrett <[email protected]>
Diffstat (limited to 'lib/mpi/mpi-scan.c')
0 files changed, 0 insertions, 0 deletions
