2
0
forked from Ivasoft/openwrt

kernel: fix possible mtd NULL pointer dereference

Fixes: cae4d089bc ("kernel: backport mtd dynamic partition patch")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit a5265497a4)
This commit is contained in:
Rafał Miłecki
2022-10-04 12:04:37 +02:00
parent 562894b39d
commit 977f6f36a0
4 changed files with 33 additions and 3 deletions

View File

@@ -20,7 +20,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
#include <linux/nvmem-provider.h>
#include <linux/mtd/mtd.h>
@@ -765,6 +766,19 @@ int add_mtd_device(struct mtd_info *mtd)
@@ -767,6 +768,19 @@ int add_mtd_device(struct mtd_info *mtd)
of this try_ nonsense, and no bitching about it
either. :) */
__module_get(THIS_MODULE);