On 2/4/20 7:44 PM, Dafna Hirschfeld wrote: > 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@xxxxxxxxxxxxx> Acked-by: Helen Koike <helen.koike@xxxxxxxxxxxxx> Thanks Helen > --- > drivers/staging/media/rkisp1/rkisp1-dev.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/staging/media/rkisp1/rkisp1-dev.c b/drivers/staging/media/rkisp1/rkisp1-dev.c > index 21837d4dc9e1..9d866396a5de 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; >