summaryrefslogtreecommitdiffstats
path: root/drivers/serial/sunsu.c
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.cz>2010-05-03 15:25:35 +0200
committerJiri Kosina <jkosina@suse.cz>2010-05-03 15:25:35 +0200
commitd6d53cbc6b10d28646fb6184d1069f336ec76dc4 (patch)
tree1c844b3ce8bd430becbbb74875898b08d9f89bb5 /drivers/serial/sunsu.c
parent0b5adf92ec793c665b0de63ac146d190a921c391 (diff)
parent6a740aa4f47b9f29bad5292cf51f008f3edad9b1 (diff)
downloadblackbird-op-linux-d6d53cbc6b10d28646fb6184d1069f336ec76dc4.tar.gz
blackbird-op-linux-d6d53cbc6b10d28646fb6184d1069f336ec76dc4.zip
Merge branch 'hid-suspend' into picolcd
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 @@
#include <linux/serial.h>
#include <linux/sysrq.h>
#include <linux/console.h>
+#include <linux/slab.h>
#ifdef CONFIG_SERIO
#include <linux/serio.h>
#endif
@@ -1453,8 +1454,10 @@ static int __devinit su_probe(struct of_device *op, const struct of_device_id *m
if (up->su_type == SU_PORT_KBD || up->su_type == SU_PORT_MS) {
err = sunsu_kbd_ms_init(up);
if (err) {
+ of_iounmap(&op->resource[0],
+ up->port.membase, up->reg_size);
kfree(up);
- goto out_unmap;
+ return err;
}
dev_set_drvdata(&op->dev, up);
OpenPOWER on IntegriCloud