[git:media_stage/master] media: nuvoton: npcm-video: Fix IS_ERR() vs NULL bug

2023-10-02 Thread Hans Verkuil
This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: nuvoton: npcm-video: Fix IS_ERR() vs NULL bug
Author:  Dan Carpenter 
Date:Wed Sep 27 15:39:43 2023 +0300

The of_parse_phandle() function returns NULL on error.  It never returns
error pointers.  Update the check accordingly.

Fixes: 70721089985c ("media: nuvoton: Add driver for NPCM video capture and 
encoding engine")
Signed-off-by: Dan Carpenter 
Signed-off-by: Hans Verkuil 

 drivers/media/platform/nuvoton/npcm-video.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

---

diff --git a/drivers/media/platform/nuvoton/npcm-video.c 
b/drivers/media/platform/nuvoton/npcm-video.c
index ac8d73b794d3..b9e6782f59b4 100644
--- a/drivers/media/platform/nuvoton/npcm-video.c
+++ b/drivers/media/platform/nuvoton/npcm-video.c
@@ -1660,9 +1660,9 @@ static int npcm_video_ece_init(struct npcm_video *video)
void __iomem *regs;
 
ece_node = of_parse_phandle(video->dev->of_node, "nuvoton,ece", 0);
-   if (IS_ERR(ece_node)) {
+   if (!ece_node) {
dev_err(dev, "Failed to get ECE phandle in DTS\n");
-   return PTR_ERR(ece_node);
+   return -ENODEV;
}
 
video->ece.enable = of_device_is_available(ece_node);

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[git:media_stage/master] media: nuvoton: npcm-video: Fix IS_ERR() vs NULL bug

2023-10-07 Thread Hans Verkuil
This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: nuvoton: npcm-video: Fix IS_ERR() vs NULL bug
Author:  Dan Carpenter 
Date:Wed Sep 27 15:39:43 2023 +0300

The of_parse_phandle() function returns NULL on error.  It never returns
error pointers.  Update the check accordingly.

Fixes: 70721089985c ("media: nuvoton: Add driver for NPCM video capture and 
encoding engine")
Signed-off-by: Dan Carpenter 
Signed-off-by: Hans Verkuil 

 drivers/media/platform/nuvoton/npcm-video.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

---

diff --git a/drivers/media/platform/nuvoton/npcm-video.c 
b/drivers/media/platform/nuvoton/npcm-video.c
index ac8d73b794d3..b9e6782f59b4 100644
--- a/drivers/media/platform/nuvoton/npcm-video.c
+++ b/drivers/media/platform/nuvoton/npcm-video.c
@@ -1660,9 +1660,9 @@ static int npcm_video_ece_init(struct npcm_video *video)
void __iomem *regs;
 
ece_node = of_parse_phandle(video->dev->of_node, "nuvoton,ece", 0);
-   if (IS_ERR(ece_node)) {
+   if (!ece_node) {
dev_err(dev, "Failed to get ECE phandle in DTS\n");
-   return PTR_ERR(ece_node);
+   return -ENODEV;
}
 
video->ece.enable = of_device_is_available(ece_node);

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits