On 6/22/20 6:55 AM, Gerd Hoffmann wrote:
> @@ -147,6 +150,9 @@ DeviceState *qdev_new(const char *name)
>   */
>  DeviceState *qdev_try_new(const char *name)
>  {
> +    if (!object_class_by_name(name)) {
> +        qdev_module_load_type(name);
> +    }
>      if (!object_class_by_name(name)) {
>          return NULL;
>      }

The second if can be nested inside the first.
Otherwise,
Reviewed-by: Richard Henderson <[email protected]>


r~

Reply via email to