hc
2024-05-13 9d77db3c730780c8ef5ccd4b66403ff5675cfe4e
kernel/drivers/mtd/maps/pxa2xx-flash.c
....@@ -1,12 +1,9 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Map driver for Intel XScale PXA2xx platforms.
34 *
45 * Author: Nicolas Pitre
56 * Copyright: (C) 2001 MontaVista Software Inc.
6
- *
7
- * This program is free software; you can redistribute it and/or modify
8
- * it under the terms of the GNU General Public License version 2 as
9
- * published by the Free Software Foundation.
107 */
118
129 #include <linux/module.h>
....@@ -69,10 +66,10 @@
6966 if (!info->map.virt) {
7067 printk(KERN_WARNING "Failed to ioremap %s\n",
7168 info->map.name);
69
+ kfree(info);
7270 return -ENOMEM;
7371 }
74
- info->map.cached =
75
- ioremap_cached(info->map.phys, info->map.size);
72
+ info->map.cached = ioremap_cache(info->map.phys, info->map.size);
7673 if (!info->map.cached)
7774 printk(KERN_WARNING "Failed to ioremap cached %s\n",
7875 info->map.name);
....@@ -91,6 +88,7 @@
9188 iounmap((void *)info->map.virt);
9289 if (info->map.cached)
9390 iounmap(info->map.cached);
91
+ kfree(info);
9492 return -EIO;
9593 }
9694 info->mtd->dev.parent = &pdev->dev;