ACPI: thinkpad-acpi: don't misdetect in get_thinkpad_model_data() on -ENOMEM
commit8721746d40e6243011fd59ca12c643a41cf211da
authorHenrique de Moraes Holschuh <hmh@hmh.eng.br>
Sun, 29 Jun 2008 15:46:38 +0000 (29 12:46 -0300)
committerHenrique de Moraes Holschuh <hmh@hmh.eng.br>
Sun, 29 Jun 2008 15:46:38 +0000 (29 12:46 -0300)
treecf0e8d03fe5d1c8c79af5860d5feda3e3a711278
parent91390d3a31bbfd47fe14cc02a610d35e6d2592df
ACPI: thinkpad-acpi: don't misdetect in get_thinkpad_model_data() on -ENOMEM

Explicitly check for memory allocation failures, and return status to
indicate that we could not collect data due to errors.

This lets the driver have a far more predictable failure mode on ENOMEM in
that codepath: it will refuse to load.  This is far better than trying to
proceed with missing data which is used to detect quirks, etc.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
drivers/misc/thinkpad_acpi.c