提交 0539771d 编写于 作者: H Henrique de Moraes Holschuh 提交者: Len Brown

ACPI: bay: use IS_ERR for return of register_platform_device_simple

register_platform_device_simple returns ERR_PTR(foo), so test it with
IS_ERR(foo).
Signed-off-by: NHenrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: NLen Brown <len.brown@intel.com>
上级 ecb5f752
...@@ -283,7 +283,7 @@ static int bay_add(acpi_handle handle, int id) ...@@ -283,7 +283,7 @@ static int bay_add(acpi_handle handle, int id)
/* initialize platform device stuff */ /* initialize platform device stuff */
pdev = platform_device_register_simple(ACPI_BAY_CLASS, id, NULL, 0); pdev = platform_device_register_simple(ACPI_BAY_CLASS, id, NULL, 0);
if (pdev == NULL) { if (IS_ERR(pdev)) {
printk(KERN_ERR PREFIX "Error registering bay device\n"); printk(KERN_ERR PREFIX "Error registering bay device\n");
goto bay_add_err; goto bay_add_err;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册