mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] fjes: fix missed check in fjes_acpi_add
@ 2019-12-09 16:22 Chuhong Yuan
  2019-12-09 22:42 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Chuhong Yuan @ 2019-12-09 16:22 UTC (permalink / raw)
  Cc: David S . Miller, Taku Izumi, netdev, linux-kernel, Chuhong Yuan

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>
---
 drivers/net/fjes/fjes_main.c | 3 +++
 1 file changed, 3 insertions(+)

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;
-- 
2.24.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] fjes: fix missed check in fjes_acpi_add
  2019-12-09 16:22 [PATCH] fjes: fix missed check in fjes_acpi_add Chuhong Yuan
@ 2019-12-09 22:42 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2019-12-09 22:42 UTC (permalink / raw)
  To: hslester96; +Cc: izumi.taku, netdev, linux-kernel

From: Chuhong Yuan <hslester96@gmail.com>
Date: Tue, 10 Dec 2019 00:22:07 +0800

> 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>

Applied.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-12-09 22:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-09 16:22 [PATCH] fjes: fix missed check in fjes_acpi_add Chuhong Yuan
2019-12-09 22:42 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®