ply-device-manager: Fix bad assertion

The function watch_for_udev_events() asserts that udev_monitor cannot be
NULL.

This situation is actually possible and it is easy reproductible by
deactivating and reactivating the splash then.

This commit removes that assertion which is not true. Furthermore, the
function allocates a monitor if it is NULL, right after that assertion.

Fixes:

	00:12:42.405 ply-boot-server.c:393:print_connection_process_identity       : connection is from pid 2227 (plymouth reactivate) with parent pid 2137 (-ash)
	00:12:42.405 ply-boot-server.c:521:ply_boot_connection_on_request          : got reactivate request
	00:12:42.405 ply-terminal.c:637:ply_terminal_open                          : trying to open terminal '/dev/tty1'
	00:12:42.405 ply-terminal.c:430:ply_terminal_refresh_geometry              : looking up terminal text geometry
	00:12:42.405 ply-terminal.c:442:ply_terminal_refresh_geometry              : terminal is now 240x67 text cells
	00:12:42.405 ply-device-manager.c:1062:ply_device_manager_activate_keyboard: activating keyboards
	00:12:42.405 ply-device-manager.c:1114:ply_device_manager_unpause          : ply_device_manager_unpause() called, resuming watching for udev events
	00:12:42.405 ply-device-manager.c:1118:ply_device_manager_unpause          : ply_device_manager_unpause(): timeout elapsed while paused, looking for udev devices
	00:12:42.406 ply-device-manager.c:909:create_devices_from_udev             : Timeout elapsed, looking for devices from udev
	00:12:42.406 ply-device-manager.c:331:create_devices_for_subsystem         : creating objects for drm devices
	00:12:42.407 ply-device-manager.c:351:create_devices_for_subsystem         : found device /sys/devices/platform/soc/soc:gpu/drm/card0
	00:12:42.407 ply-device-manager.c:358:create_devices_for_subsystem         : device is initialized
	00:12:42.408 ply-device-manager.c:367:create_devices_for_subsystem         : found node /dev/dri/card0
	00:12:42.408 ply-device-manager.c:275:create_devices_for_udev_device       : device subsystem is drm
	00:12:42.408 ply-device-manager.c:278:create_devices_for_udev_device       : found DRM device /dev/dri/card0
	00:12:42.408 ply-device-manager.c:774:create_devices_for_terminal_and_rende: ignoring device /dev/dri/card0 since it's already managed
	00:12:42.408 ply-device-manager.c:351:create_devices_for_subsystem         : found device /sys/devices/platform/soc/soc:gpu/drm/card0/card0-Composite-1
	00:12:42.408 ply-device-manager.c:358:create_devices_for_subsystem         : device is initialized
	00:12:42.409 ply-device-manager.c:351:create_devices_for_subsystem         : found device /sys/devices/platform/soc/soc:gpu/drm/card0/card0-HDMI-A-1
	00:12:42.409 ply-device-manager.c:358:create_devices_for_subsystem         : device is initialized
	00:12:42.409 ply-device-manager.c:351:create_devices_for_subsystem         : found device /sys/devices/platform/soc/soc:gpu/drm/card0/card0-Writeback-1
	00:12:42.410 ply-device-manager.c:358:create_devices_for_subsystem         : device is initialized
	00:12:42.410 ply-device-manager.c:351:create_devices_for_subsystem         : found device /sys/devices/platform/soc/soc:gpu/drm/renderD128
	00:12:42.410 ply-device-manager.c:358:create_devices_for_subsystem         : device is initialized
	00:12:42.410 ply-device-manager.c:371:create_devices_for_subsystem         : device doesn't have a devices tag
	00:12:42.410 ply-device-manager.c:331:create_devices_for_subsystem         : creating objects for frame buffer devices
	00:12:42.411 ply-device-manager.c:351:create_devices_for_subsystem         : found device /sys/devices/platform/soc/soc:gpu/graphics/fb0
	00:12:42.412 ply-device-manager.c:358:create_devices_for_subsystem         : device is initialized
	00:12:42.412 ply-device-manager.c:367:create_devices_for_subsystem         : found node /dev/fb0
	00:12:42.412 ply-device-manager.c:275:create_devices_for_udev_device       : device subsystem is graphics
	00:12:42.412 ply-device-manager.c:281:create_devices_for_udev_device       : found frame buffer device /dev/fb0
	00:12:42.412 ply-device-manager.c:231:fb_device_has_drm_device             : trying to find associated drm node for fb device (path: platform-soc:gpu)
	00:12:42.418 ply-device-manager.c:285:create_devices_for_udev_device       : ignoring, since there's a DRM device associated with it
	00:12:42.418 ply-device-manager.c:351:create_devices_for_subsystem         : found device /sys/devices/virtual/graphics/fbcon
	00:12:42.418 ply-device-manager.c:374:create_devices_for_subsystem         : it's not initialized
	Assertion failed: manager->udev_monitor == NULL (ply-device-manager.c: watch_for_udev_events: 461)
	Aborted

Signed-off-by: Gaël PORTAY <gael.portay@collabora.com>
2 jobs for fix-another-bad-assertion in 4 minutes and 9 seconds (queued for 2 seconds)
latest