summaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorRichard Acayan <mailingradian@gmail.com>2023-11-21 19:54:59 -0500
committerHans de Goede <hdegoede@redhat.com>2023-11-22 09:51:16 +0100
commit9c6894320f49c146270623bb37cd700db7cf13df (patch)
tree451a9238d1641e1beb33ec51f7fc20aef17ff593 /drivers/video
parenta4dea9a06f72c7885f8d4dccedec7e477878d798 (diff)
downloadlinux-stable-9c6894320f49c146270623bb37cd700db7cf13df.tar.gz
linux-stable-9c6894320f49c146270623bb37cd700db7cf13df.tar.bz2
linux-stable-9c6894320f49c146270623bb37cd700db7cf13df.zip
fbdev/simplefb: Suppress error on missing power domains
When the power domains are missing, the call to of_count_phandle_with_args fails with -ENOENT. The power domains are not required and there are some device trees that do not specify them. Suppress this error to fix devices without power domains attached to simplefb. Fixes: 92a511a568e4 ("fbdev/simplefb: Add support for generic power-domains") Closes: https://lore.kernel.org/linux-fbdev/ZVwFNfkqjrvhFHM0@radian Signed-off-by: Richard Acayan <mailingradian@gmail.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20231122005457.330066-3-mailingradian@gmail.com
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/fbdev/simplefb.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/video/fbdev/simplefb.c b/drivers/video/fbdev/simplefb.c
index fe682af63827..6f58ee276ad1 100644
--- a/drivers/video/fbdev/simplefb.c
+++ b/drivers/video/fbdev/simplefb.c
@@ -466,6 +466,10 @@ static int simplefb_attach_genpds(struct simplefb_par *par,
err = of_count_phandle_with_args(dev->of_node, "power-domains",
"#power-domain-cells");
if (err < 0) {
+ /* Nothing wrong if optional PDs are missing */
+ if (err == -ENOENT)
+ return 0;
+
dev_info(dev, "failed to parse power-domains: %d\n", err);
return err;
}