media: vimc: keep the error value when adding an entity fails
authorDafna Hirschfeld <dafna.hirschfeld@collabora.com>
Sat, 28 Mar 2020 07:52:52 +0000 (08:52 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Tue, 14 Apr 2020 10:02:46 +0000 (12:02 +0200)
commit967534cb49cd389b101848fa0c99dd8a1e961fbb
treef6c744f09e85d5adff0a78ae4a3945631483f17d
parent7a040cf303438c567fceb987f10cfd058619f2c9
media: vimc: keep the error value when adding an entity fails

Currently when the 'add' callback of an entity fails, a
NULL is returned. This hides the error code of the failure
and always returns -EINVAL.

Replace return NULL with return ERR_PTR(ret) to improve debugging.

Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/test_drivers/vimc/vimc-capture.c
drivers/media/test_drivers/vimc/vimc-core.c
drivers/media/test_drivers/vimc/vimc-debayer.c
drivers/media/test_drivers/vimc/vimc-scaler.c
drivers/media/test_drivers/vimc/vimc-sensor.c