mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-09 14:50:19 +00:00
media: nuvoton: npcm-video: Fix IS_ERR() vs NULL bug
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 <dan.carpenter@linaro.org> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
This commit is contained in:
parent
04d19e6513
commit
5f9fcbf92d
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user