[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)
commit6b2bed891253c08e7f4c17dbd46b71fc87f22eef
tree84f9ebc73aea14152802d5992a5afb147c6332a7
parenteadf081146ec327d6fbbb6aff28e3d9aac329dc6
[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: 57b2c0628b60 ("[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