diff options
author | Lidong Zhong <lidong.zhong@suse.com> | 2024-04-11 05:04:50 +0300 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2024-04-29 16:51:16 +0300 |
commit | 29247de4ad753771afef95ace8af738d807ca279 (patch) | |
tree | bdfad847f3d95a0d5eaaa7d1eb340b0fc6e7d954 | |
parent | ff2e185cf73df480ec69675936c4ee75a445c3e4 (diff) | |
download | linux-29247de4ad753771afef95ace8af738d807ca279.tar.xz |
powerpc/pseries/vio: Don't return ENODEV if node or compatible missing
We noticed the following nuisance messages during boot process:
vio vio: uevent: failed to send synthetic uevent
vio 4000: uevent: failed to send synthetic uevent
vio 4001: uevent: failed to send synthetic uevent
vio 4002: uevent: failedto send synthetic uevent
vio 4004: uevent: failed to send synthetic uevent
It's caused by either vio_register_device_node() failing to set
dev->of_node or the node is missing a "compatible" property. To match
the definition of modalias in modalias_show(), remove the return of
ENODEV in such cases. The failure messages is also suppressed with this
change.
Signed-off-by: Lidong Zhong <lidong.zhong@suse.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20240411020450.12725-1-lidong.zhong@suse.com
-rw-r--r-- | arch/powerpc/platforms/pseries/vio.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/arch/powerpc/platforms/pseries/vio.c b/arch/powerpc/platforms/pseries/vio.c index 90ff85c879bf..b2babfdbc40b 100644 --- a/arch/powerpc/platforms/pseries/vio.c +++ b/arch/powerpc/platforms/pseries/vio.c @@ -1592,13 +1592,9 @@ static int vio_hotplug(const struct device *dev, struct kobj_uevent_env *env) const char *cp; dn = dev->of_node; - if (!dn) - return -ENODEV; - cp = of_get_property(dn, "compatible", NULL); - if (!cp) - return -ENODEV; + if (dn && (cp = of_get_property(dn, "compatible", NULL))) + add_uevent_var(env, "MODALIAS=vio:T%sS%s", vio_dev->type, cp); - add_uevent_var(env, "MODALIAS=vio:T%sS%s", vio_dev->type, cp); return 0; } |