]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 17 Feb 2025 09:05:34 +0000 (10:05 +0100)
commitf4e4373322f8d4c19721831f7fb989e52d30dab0
treefe0f210697a2ec4a6686670289f3061ad8cdb121
parentfd551f51908e7a1ce135850b1aaa5740e78f54e0
media: i2c: ds90ub9x3: Fix extra fwnode_handle_put()

commit 60b45ece41c5632a3a3274115a401cb244180646 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/media/i2c/ds90ub913.c
drivers/media/i2c/ds90ub953.c