]> git.baikalelectronics.ru Git - kernel.git/commit
[media] st-hva: fix some error handling in hva_hw_probe()
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 14 Oct 2016 07:32:24 +0000 (04:32 -0300)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Wed, 16 Nov 2016 15:05:36 +0000 (13:05 -0200)
commite208227c2e9e76d2971cd542a683164120c83b75
tree84f9ebc73aea14152802d5992a5afb147c6332a7
parenta58a40612f464903c4381de7f0f368a5c4a429df
[media] st-hva: fix some error handling in hva_hw_probe()

The devm_ioremap_resource() returns error pointers, never NULL.  The
platform_get_resource() returns NULL on error, never error pointers.
The error code needs to be set, as well.  The current code returns
PTR_ERR(NULL) which is success.

Fixes: 25c7252c3150 ("[media] st-hva: multi-format video encoder V4L2 driver")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Jean-Christophe Trotin <jean-christophe.trotin@st.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/platform/sti/hva/hva-hw.c