mtd: ubi: fix unreleased fwnode_handle in find_volume_fwnode()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Javier Carrasco <javier.carrasco.cruz@xxxxxxxxx>

commit 07593293ffabba14125c8998525adde5a832bfa3 upstream.

The 'fw_vols' fwnode_handle initialized via
device_get_named_child_node() requires explicit calls to
fwnode_handle_put() when the variable is no longer required.

Add the missing calls to fwnode_handle_put() before the function
returns.

Cc: stable@xxxxxxxxxxxxxxx
Fixes: 51932f9fc487 ("mtd: ubi: populate ubi volume fwnode")
Signed-off-by: Javier Carrasco <javier.carrasco.cruz@xxxxxxxxx>
Reviewed-by: Zhihao Cheng <chengzhihao1@xxxxxxxxxx>
Signed-off-by: Richard Weinberger <richard@xxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 drivers/mtd/ubi/vmt.c |    2 ++
 1 file changed, 2 insertions(+)

--- a/drivers/mtd/ubi/vmt.c
+++ b/drivers/mtd/ubi/vmt.c
@@ -143,8 +143,10 @@ static struct fwnode_handle *find_volume
 		    vol->vol_id != volid)
 			continue;
 
+		fwnode_handle_put(fw_vols);
 		return fw_vol;
 	}
+	fwnode_handle_put(fw_vols);
 
 	return NULL;
 }


Patches currently in stable-queue which might be from javier.carrasco.cruz@xxxxxxxxx are

queue-6.11/leds-max5970-fix-unreleased-fwnode_handle-in-probe-f.patch
queue-6.11/wifi-brcmfmac-release-root-node-in-all-execution-paths.patch
queue-6.11/usb-typec-use-cleanup-facility-for-altmodes_node.patch
queue-6.11/bluetooth-btbcm-fix-missing-of_node_put-in-btbcm_get.patch
queue-6.11/platform-chrome-cros_ec_typec-fix-missing-fwnode-reference-decrement.patch
queue-6.11/clocksource-drivers-timer-ti-dm-fix-child-node-refco.patch
queue-6.11/mtd-ubi-fix-unreleased-fwnode_handle-in-find_volume_fwnode.patch




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux