For the first patch, I observed a crash on accessing this system being NULL on one game's hang log. I don't know if that is the actual problem or consequences of something else from the info I've got, but the check looks like the right thing to do: documentation [1] lists NULL as possible error return.
1. https://manpages.debian.org/stretch/libudev-dev/udev_device_get_subsystem.3....