mfd: dln2: Fix double put in dln2_probe
authorDinghao Liu <dinghao.liu@zju.edu.cn>
Mon, 25 Sep 2023 02:41:33 +0000 (10:41 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 20 Nov 2023 10:59:24 +0000 (11:59 +0100)
commite7a7ffeb92240219e77a3044ddb9c4f64278a3e9
tree59098bdf858da906cab867f9e23168bc971e20fb
parent82fa83fbcc114f550472aebf5c61c5c7744d91f3
mfd: dln2: Fix double put in dln2_probe

[ Upstream commit 759c409bc5fc496cbc22cd0b392d3cbb0c0e23eb ]

The dln2_free() already contains usb_put_dev(). Therefore,
the redundant usb_put_dev() before dln2_free() may lead to
a double free.

Fixes: 96da8f148396 ("mfd: dln2: Fix memory leak in dln2_probe()")
Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn>
Link: https://lore.kernel.org/r/20230925024134.9683-1-dinghao.liu@zju.edu.cn
Signed-off-by: Lee Jones <lee@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/mfd/dln2.c