aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/serial/sunsu.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/serial/sunsu.c')
-rw-r--r--drivers/serial/sunsu.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/serial/sunsu.c b/drivers/serial/sunsu.c
index 170d3d68c8f0..01f7731e59b8 100644
--- a/drivers/serial/sunsu.c
+++ b/drivers/serial/sunsu.c
@@ -29,6 +29,7 @@
29#include <linux/serial.h> 29#include <linux/serial.h>
30#include <linux/sysrq.h> 30#include <linux/sysrq.h>
31#include <linux/console.h> 31#include <linux/console.h>
32#include <linux/slab.h>
32#ifdef CONFIG_SERIO 33#ifdef CONFIG_SERIO
33#include <linux/serio.h> 34#include <linux/serio.h>
34#endif 35#endif
@@ -1453,8 +1454,10 @@ static int __devinit su_probe(struct of_device *op, const struct of_device_id *m
1453 if (up->su_type == SU_PORT_KBD || up->su_type == SU_PORT_MS) { 1454 if (up->su_type == SU_PORT_KBD || up->su_type == SU_PORT_MS) {
1454 err = sunsu_kbd_ms_init(up); 1455 err = sunsu_kbd_ms_init(up);
1455 if (err) { 1456 if (err) {
1457 of_iounmap(&op->resource[0],
1458 up->port.membase, up->reg_size);
1456 kfree(up); 1459 kfree(up);
1457 goto out_unmap; 1460 return err;
1458 } 1461 }
1459 dev_set_drvdata(&op->dev, up); 1462 dev_set_drvdata(&op->dev, up);
1460 1463