Skip to contentSkip to conversation

dw9807 driver fix, dw9714 cleanup

PATCH New Sakari Ailus 1 participant 3 messages Oct 6, 2018

Subsystems (4)
lore
Share & tools
lore

Sakari Ailus

author maintainer
#0 lore raw

cover dw9807 driver fix, dw9714 cleanup

Hi Raj, others,

One fix and one cleanup for the dw9807 and dw9714 drivers. The dw9807 driver had the same issue than what you fixed in dw9714.

Sakari Ailus (2):
dw9714: Remove useless error message
dw9807: Fix probe error handling

 drivers/media/i2c/dw9714.c     | 2 +-
 drivers/media/i2c/dw9807-vcm.c | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)
Signature · 1 line
2.11.0
author maintainer
#1 lore raw

PATCH 1/2 dw9714: Remove useless error message

If probe fails, the kernel will print the error code. There's no need to driver to do that.

---
 drivers/media/i2c/dw9714.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/i2c/dw9714.c +1 -1
index 3dc2100470a1..26d83693a681 100644
@@ -171,7 +171,7 @@ static int dw9714_probe(struct i2c_client *client)
 err_cleanup:
 	v4l2_ctrl_handler_free(&dw9714_dev->ctrls_vcm);
 	media_entity_cleanup(&dw9714_dev->sd.entity);
-	dev_err(&client->dev, "Probe failed: %d\n", rval);
+
 	return rval;
 }
 
Signature · 1 line
2.11.0
author maintainer
#2 lore raw

PATCH 2/2 dw9807-vcm: Fix probe error handling

In reply to Sakari Ailus

v4l2_async_unregister_subdev() may not be called without v4l2_async_register_subdev() being called first. Fix this.

---
 drivers/media/i2c/dw9807-vcm.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/media/i2c/dw9807-vcm.c +2 -1
index a532c57dc636..73b0e10dc591 100644
@@ -218,7 +218,8 @@ static int dw9807_probe(struct i2c_client *client)
 	return 0;
 
 err_cleanup:
-	dw9807_subdev_cleanup(dw9807_dev);
+	v4l2_ctrl_handler_free(&dw9807_dev->ctrls_vcm);
+	media_entity_cleanup(&dw9807_dev->sd.entity);
 
 	return rval;
 }
Signature · 1 line
2.11.0