[-next,media] atmel-isc: fix error return code in atmel_isc_probe()

Message ID 1478871620-24274-1-git-send-email-weiyj.lk@gmail.com (mailing list archive)
State Accepted, archived
Delegated to: Hans Verkuil
Headers

Commit Message

Wei Yongjun Nov. 11, 2016, 1:40 p.m. UTC
  From: Wei Yongjun <weiyongjun1@huawei.com>

Fix to return error code -ENODEV from the error handling
case instead of 0, as done elsewhere in this function.

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 drivers/media/platform/atmel/atmel-isc.c | 1 +
 1 file changed, 1 insertion(+)

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
  

Patch

diff --git a/drivers/media/platform/atmel/atmel-isc.c b/drivers/media/platform/atmel/atmel-isc.c
index 8e25d3f..fa68fe9 100644
--- a/drivers/media/platform/atmel/atmel-isc.c
+++ b/drivers/media/platform/atmel/atmel-isc.c
@@ -1424,6 +1424,7 @@  static int atmel_isc_probe(struct platform_device *pdev)
 
 	if (list_empty(&isc->subdev_entities)) {
 		dev_err(dev, "no subdev found\n");
+		ret = -ENODEV;
 		goto unregister_v4l2_device;
 	}