]> www.infradead.org Git - users/dwmw2/linux.git/commit
media: i2c: ds90ub9x3: Fix extra fwnode_handle_put()
authorTomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Fri, 6 Dec 2024 08:26:37 +0000 (10:26 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Thu, 19 Dec 2024 11:50:15 +0000 (12:50 +0100)
commit60b45ece41c5632a3a3274115a401cb244180646
treee96197ce169ed821b384e68f403f9fc066fba3ed
parentf8d0343046655590723628cc0c240161995c135d
media: i2c: ds90ub9x3: Fix extra fwnode_handle_put()

The ub913 and ub953 drivers call fwnode_handle_put(priv->sd.fwnode) as
part of their remove process, and if the driver is removed multiple
times, eventually leads to put "overflow", possibly causing memory
corruption or crash.

The fwnode_handle_put() is a leftover from commit 905f88ccebb1 ("media:
i2c: ds90ub9x3: Fix sub-device matching"), which changed the code
related to the sd.fwnode, but missed removing these fwnode_handle_put()
calls.

Cc: stable@vger.kernel.org
Fixes: 905f88ccebb1 ("media: i2c: ds90ub9x3: Fix sub-device matching")
Reviewed-by: Jai Luthra <jai.luthra@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/i2c/ds90ub913.c
drivers/media/i2c/ds90ub953.c