提交 963497c1 编写于 作者: L Lebedev, Vladimir P 提交者: Len Brown

ACPI: sbs: check for NULL device pointer

Signed-off-by: NLen Brown <len.brown@intel.com>
上级 b4bd8c66
......@@ -1685,10 +1685,16 @@ static int acpi_sbs_add(struct acpi_device *device)
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;
if (!device || !sbs) {
if (!device) {
return -EINVAL;
}
sbs = (struct acpi_sbs *)acpi_driver_data(device);
if (!sbs) {
return -EINVAL;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册