mirror of
https://github.com/FEX-Emu/linux.git
synced 2025-02-10 05:15:57 +00:00
[media] v4l: subdev: Clean up properly in subdev devnode registration error path
Set the subdev devnode pointer right after registration to ensure that later errors won't skip the subdev when unregistering all devnodes. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
This commit is contained in:
parent
8af7779f3c
commit
909aa003eb
@ -253,6 +253,7 @@ int v4l2_device_register_subdev_nodes(struct v4l2_device *v4l2_dev)
|
||||
kfree(vdev);
|
||||
goto clean_up;
|
||||
}
|
||||
sd->devnode = vdev;
|
||||
#if defined(CONFIG_MEDIA_CONTROLLER)
|
||||
sd->entity.info.dev.major = VIDEO_MAJOR;
|
||||
sd->entity.info.dev.minor = vdev->minor;
|
||||
@ -270,7 +271,6 @@ int v4l2_device_register_subdev_nodes(struct v4l2_device *v4l2_dev)
|
||||
}
|
||||
}
|
||||
#endif
|
||||
sd->devnode = vdev;
|
||||
}
|
||||
return 0;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user