diff options
author | Chuhong Yuan <hslester96@gmail.com> | 2019-12-10 00:22:07 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-12-09 14:41:25 -0800 |
commit | a288f105a03a7e0e629a8da2b31f34ebf0343ee2 (patch) | |
tree | 52017b80fe868da5df6b8844d2299f97ea37f178 /drivers/net | |
parent | b43d1f9f7067c6759b1051e8ecb84e82cef569fe (diff) | |
download | linux-a288f105a03a7e0e629a8da2b31f34ebf0343ee2.tar.bz2 |
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: 658d439b2292 ("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>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/fjes/fjes_main.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/fjes/fjes_main.c b/drivers/net/fjes/fjes_main.c index b517c1af9de0..91a1059517f5 100644 --- a/drivers/net/fjes/fjes_main.c +++ b/drivers/net/fjes/fjes_main.c @@ -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; |