]> git.dujemihanovic.xyz Git - u-boot.git/commit
arm: mvebu: turris_omnia: fix leaked mtd device
authorMarek Behún <marek.behun@nic.cz>
Sat, 25 Sep 2021 00:49:18 +0000 (02:49 +0200)
committerStefan Roese <sr@denx.de>
Mon, 27 Sep 2021 05:41:45 +0000 (07:41 +0200)
commit0ef476e68ef6391c2358894b5e6ba51083718883
treeac8dd42b914aa465a76727c35d4e8600d7eef2ab
parent8284d6f838684cfa6e3303a447deb38027c5d7f0
arm: mvebu: turris_omnia: fix leaked mtd device

After getting MTD device via get_mtd_device_nm(), we need to put it with
put_mtd_device(), otherwise we get

  Removing MTD device #0 (mx25l6405d) with use count 1

before booting kernel.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Pali Rohár <pali@kernel.org>
Tested-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
board/CZ.NIC/turris_omnia/turris_omnia.c