mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-18 22:14:16 +00:00
ACPI: sbs: check for NULL device pointer
Signed-off-by: Len Brown <len.brown@intel.com>
This commit is contained in:
parent
b4bd8c6643
commit
963497c12a
1 changed files with 8 additions and 2 deletions
|
@ -1685,10 +1685,16 @@ static int acpi_sbs_add(struct acpi_device *device)
|
||||||
|
|
||||||
int acpi_sbs_remove(struct acpi_device *device, int type)
|
int acpi_sbs_remove(struct acpi_device *device, int type)
|
||||||
{
|
{
|
||||||
struct acpi_sbs *sbs = (struct acpi_sbs *)acpi_driver_data(device);
|
struct acpi_sbs *sbs = NULL;
|
||||||
int id;
|
int id;
|
||||||
|
|
||||||
if (!device || !sbs) {
|
if (!device) {
|
||||||
|
return -EINVAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
sbs = (struct acpi_sbs *)acpi_driver_data(device);
|
||||||
|
|
||||||
|
if (!sbs) {
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue