summaryrefslogtreecommitdiffstats
path: root/drivers/serial/sunsu.c
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2010-05-08 23:59:58 +0200
committerH. Peter Anvin <hpa@zytor.com>2010-05-08 23:59:58 +0200
commitd7be0ce6afb1df60bc786f57410407ceae92b994 (patch)
tree5e91acfc12c833531ad3320f274e0cd96a129973 /drivers/serial/sunsu.c
parentx86: Clean up the hypervisor layer (diff)
parentLinux 2.6.34-rc6 (diff)
downloadlinux-d7be0ce6afb1df60bc786f57410407ceae92b994.tar.xz
linux-d7be0ce6afb1df60bc786f57410407ceae92b994.zip
Merge commit 'v2.6.34-rc6' into x86/cpu
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);