mtd: core: fix possible resource leak in init_mtd()
This is an automated ID intended to aid in discovery of potential security vulnerabilities. The actual impact and attack plausibility have not yet been proven. This ID is fixed in Linux Kernel version v6.0.16 by commit 78816504100cbd8e6836df9f58cc4fbb8b262f1c, it was introduced in version v4.10 by commit 445caaa20c4d6da74f426464f90513b81157ad77. For more details please see the references link.