hotplug: avoid using the deprecated is_error() call, check for NULL pointer instead