mirror of
https://github.com/torvalds/linux.git
synced 2024-12-02 09:01:34 +00:00
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: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
This commit is contained in:
parent
ecb5f7521a
commit
0539771d72
@ -283,7 +283,7 @@ static int bay_add(acpi_handle handle, int id)
|
||||
|
||||
/* initialize platform device stuff */
|
||||
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");
|
||||
goto bay_add_err;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user