For filesystems which do not have a quota_format_type such as upcoming UBIFS quota fmt may be NULL. Only put the format when it's non NULL. Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx> --- fs/quota/dquot.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/quota/dquot.c b/fs/quota/dquot.c index 3cb836351c22..b043468e53f2 100644 --- a/fs/quota/dquot.c +++ b/fs/quota/dquot.c @@ -218,6 +218,9 @@ static struct quota_format_type *find_quota_format(int id) static void put_quota_format(struct quota_format_type *fmt) { + if (!fmt) + return; + module_put(fmt->qf_owner); } -- 2.20.1 ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/