diff options
author | Dafna Hirschfeld <dafna.hirschfeld@collabora.com> | 2020-02-04 22:44:45 +0100 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2020-02-24 17:37:58 +0100 |
commit | 0564fd36f6f54ed552de5a01331bd36168507841 (patch) | |
tree | ddc6b99966c7d124f4bc8689778cc4b92ac906a9 /drivers/staging/media/rkisp1 | |
parent | fdab089e3150d92b2409994fdc32350dbfefab85 (diff) | |
download | linux-0564fd36f6f54ed552de5a01331bd36168507841.tar.bz2 |
media: staging: rkisp1: fix test of return value of media_entity_get_fwnode_pad
media_entity_get_fwnode_pad returns negative value on error
and the pad numeber on success. Therefore change the error test
from 'if (ret)' to 'if (ret < 0)' .
Fixes: d65dd85281fb ("media: staging: rkisp1: add Rockchip ISP1 base driver")
Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>
Acked-by: Helen Koike <helen.koike@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/staging/media/rkisp1')
-rw-r--r-- | drivers/staging/media/rkisp1/rkisp1-dev.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/media/rkisp1/rkisp1-dev.c b/drivers/staging/media/rkisp1/rkisp1-dev.c index 275310d69ca1..0f74153ce66b 100644 --- a/drivers/staging/media/rkisp1/rkisp1-dev.c +++ b/drivers/staging/media/rkisp1/rkisp1-dev.c @@ -128,7 +128,7 @@ static int rkisp1_create_links(struct rkisp1_device *rkisp1) ret = media_entity_get_fwnode_pad(&sd->entity, sd->fwnode, MEDIA_PAD_FL_SOURCE); - if (ret) { + if (ret < 0) { dev_err(sd->dev, "failed to find src pad for %s\n", sd->name); return ret; |