Re: [PATCH 1/2] base: soc: populate machine name in soc_device_register if empty
From: Martin Blumenstingl
Date: Mon Mar 20 2023 - 11:48:47 EST
On Fri, Mar 17, 2023 at 1:37 PM Heiner Kallweit <hkallweit1@xxxxxxxxx> wrote:
[...]
> +static void soc_device_get_machine(struct soc_device_attribute *soc_dev_attr)
> +{
> + struct device_node *np;
> +
> + if (soc_dev_attr->machine)
> + return;
> +
> + np = of_find_node_by_path("/");
> + of_property_read_string(np, "model", &soc_dev_attr->machine);
> + of_node_put(np);
At first I thought there's a problem with non-OF machines here.
But if CONFIG_OF is disabled the code above is a no-op because we're
not checking any error/return codes.
So this gets my:
Acked-by: Martin Blumenstingl <martin.blumenstingl@xxxxxxxxxxxxxx>