Skip to contentSkip to conversation

imx274: Fix error handling, add MAINTAINERS entry

PATCH In review Sakari Ailus 2 participants 2 messages Nov 1, 2017 – Dec 8, 2017

Subsystems (3)
lore
Share & tools
lore

Sakari Ailus

author maintainer
#0 lore raw

PATCH 1/1 imx274: Fix error handling, add MAINTAINERS entry

Add the missing MAINTAINERS entry for imx274, fix error handling in driver probe and unregister the correct control handler in driver remove.

---
The earlier version of the imx274 patchset got merged, this is the diff between what was merged and what was intended.

 MAINTAINERS                | 8 ++++++++
 drivers/media/i2c/imx274.c | 5 ++---
 2 files changed, 10 insertions(+), 3 deletions(-)
MAINTAINERS +8 -0
index adbf69306e9e..a50dc70ae30b 100644
@@ -12494,6 +12494,14 @@ S:	Maintained
 F:	drivers/ssb/
 F:	include/linux/ssb/
 
+SONY IMX274 SENSOR DRIVER
+M:	Leon Luo <[email protected]>
+L:	[email protected]
+T:	git git://linuxtv.org/media_tree.git
+S:	Maintained
+F:	drivers/media/i2c/imx274.c
+F:	Documentation/devicetree/bindings/media/i2c/imx274.txt
+
 SONY MEMORYSTICK CARD SUPPORT
 M:	Alex Dubov <[email protected]>
 W:	http://tifmxx.berlios.de/
drivers/media/i2c/imx274.c +2 -3
index ab6a5f31da74..737dbf59a0d2 100644
@@ -1770,8 +1770,7 @@ static int imx274_probe(struct i2c_client *client,
 	return 0;
 
 err_ctrls:
-	v4l2_async_unregister_subdev(sd);
-	v4l2_ctrl_handler_free(sd->ctrl_handler);
+	v4l2_ctrl_handler_free(&imx274->ctrls.handler);
 err_me:
 	media_entity_cleanup(&sd->entity);
 err_regmap:
@@ -1788,7 +1787,7 @@ static int imx274_remove(struct i2c_client *client)
 	imx274_write_table(imx274, mode_table[IMX274_MODE_STOP_STREAM]);
 
 	v4l2_async_unregister_subdev(sd);
-	v4l2_ctrl_handler_free(sd->ctrl_handler);
+	v4l2_ctrl_handler_free(&imx274->ctrls.handler);
 	media_entity_cleanup(&sd->entity);
 	mutex_destroy(&imx274->lock);
 	return 0;
Signature · 1 line
2.11.0
#1 lore raw

Em Wed, 1 Nov 2017 11:43:27 +0200
Sakari Ailus <[email protected]> escreveu:

Quoted 18 lines

Add the missing MAINTAINERS entry for imx274, fix error handling in driver probe and unregister the correct control handler in driver remove.

---
The earlier version of the imx274 patchset got merged, this is the diff between what was merged and what was intended.

 MAINTAINERS                | 8 ++++++++
 drivers/media/i2c/imx274.c | 5 ++---
 2 files changed, 10 insertions(+), 3 deletions(-)
MAINTAINERS +0 -0
index adbf69306e9e..a50dc70ae30b 100644
@@ -12494,6 +12494,14 @@ S:	Maintained
 F:	drivers/ssb/

MAINTAINERS S: Maintained · line 12504

Quoted 10 lines
MAINTAINERS +8 -0
 F:	include/linux/ssb/
 
+SONY IMX274 SENSOR DRIVER
+M:	Leon Luo <[email protected]>
+L:	[email protected]
+T:	git git://linuxtv.org/media_tree.git
+S:	Maintained
+F:	drivers/media/i2c/imx274.c
+F:	Documentation/devicetree/bindings/media/i2c/imx274.txt
+

We need Leon's signed-off-by for this change.

drivers/media/i2c/imx274.c

Quoted 7 lines
MAINTAINERS +0 -0
 SONY MEMORYSTICK CARD SUPPORT
 M:	Alex Dubov <[email protected]>
 W:	http://tifmxx.berlios.de/
drivers/media/i2c/imx274.c +0 -0
index ab6a5f31da74..737dbf59a0d2 100644

While it is OK (and actually preferred) to have MAINTAINERS together with new drivers, please don't mix driver fixes with MAINTAINERS addition.

Quoted 11 lines
drivers/media/i2c/imx274.c +1 -2
@@ -1770,8 +1770,7 @@ static int imx274_probe(struct i2c_client *client,
 	return 0;
 
 err_ctrls:
-	v4l2_async_unregister_subdev(sd);
-	v4l2_ctrl_handler_free(sd->ctrl_handler);
+	v4l2_ctrl_handler_free(&imx274->ctrls.handler);
 err_me:
 	media_entity_cleanup(&sd->entity);
 err_regmap:

drivers/media/i2c/imx274.c static int imx274_remove(struct i2c_client *client) · line 1793

Quoted 8 lines
drivers/media/i2c/imx274.c +1 -1
@@ -1788,7 +1787,7 @@ static int imx274_remove(struct i2c_client *client)
 	imx274_write_table(imx274, mode_table[IMX274_MODE_STOP_STREAM]);
 
 	v4l2_async_unregister_subdev(sd);
-	v4l2_ctrl_handler_free(sd->ctrl_handler);
+	v4l2_ctrl_handler_free(&imx274->ctrls.handler);
 	media_entity_cleanup(&sd->entity);
 	mutex_destroy(&imx274->lock);
 	return 0;

Thanks,
Mauro