fjes: fix missed check in fjes_acpi_add

fjes_acpi_add() misses a check for platform_device_register_simple().
Add a check to fix it.

Fixes: 658d439b22 ("fjes: Introduce FUJITSU Extended Socket Network Device driver")
Signed-off-by: Chuhong Yuan <hslester96@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Chuhong Yuan 2019-12-10 00:22:07 +08:00 committed by David S. Miller
parent b43d1f9f70
commit a288f105a0
1 changed files with 3 additions and 0 deletions

View File

@ -166,6 +166,9 @@ static int fjes_acpi_add(struct acpi_device *device)
/* create platform_device */
plat_dev = platform_device_register_simple(DRV_NAME, 0, fjes_resource,
ARRAY_SIZE(fjes_resource));
if (IS_ERR(plat_dev))
return PTR_ERR(plat_dev);
device->driver_data = plat_dev;
return 0;