Commit 57adfb9d authored by Philippe Gerum's avatar Philippe Gerum Committed by Jan Kiszka
Browse files

net: fix error checking in sysfs registration of device

Commit #20818d45

 did not check properly for failure of the
device_create() call.
Signed-off-by: Philippe Gerum's avatarPhilippe Gerum <>
Signed-off-by: Jan Kiszka's avatarJan Kiszka <>
parent 4f64c11a
......@@ -522,7 +522,7 @@ int rt_register_rtnetdev(struct rtnet_device *rtdev)
rtdev->sysdev = device_create(rtnet_class, NULL,
MKDEV(0, rtdev->ifindex), rtdev, rtdev->name);
if (rtdev->sysdev == NULL) {
if (IS_ERR(rtdev->sysdev)) {
err = PTR_ERR(rtdev->sysdev);
goto fail;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment