summaryrefslogtreecommitdiff
path: root/arch/cris/arch-v32/drivers/sync_serial.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-10-10 11:28:35 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2016-10-10 11:28:35 -0700
commit057a056ced1ee7e000bad2a5c88241502747d350 (patch)
treeb996aa3dfb515bef95ebe4594dd2c7b46f01db2e /arch/cris/arch-v32/drivers/sync_serial.c
parent93c26d7dc02380fe11e57ff0d152368743762169 (diff)
parent2dc024e94578c53e2c579a48725c8fe2527f9d5e (diff)
Merge tag 'cris-for-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/jesper/cris
Pull CRIS updates from Jesper Nilsson. * tag 'cris-for-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/jesper/cris: cris: return of class_create should be considered CRIS: defconfig: remove MTDRAM_ABS_POS CRIS v32: remove some double unlocks Fix typos cris: migrate exception table users off module.h and onto extable.h cris: v10: axisflashmap: remove unused ifdefs cris: use generic io.h cris: fix Kconfig mismatch when building with CONFIG_PCI cris: cardbus: fix header include path cris: add dev88_defconfig cris: irq: stop loop from accessing array out of bounds cris: fasttimer: fix mixed declarations and code compile warning cris: intmem: fix pointer comparison compile warning cris: intmem: fix device_initcall compile warning
Diffstat (limited to 'arch/cris/arch-v32/drivers/sync_serial.c')
-rw-r--r--arch/cris/arch-v32/drivers/sync_serial.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/cris/arch-v32/drivers/sync_serial.c b/arch/cris/arch-v32/drivers/sync_serial.c
index e989cee77414..ef515af1a377 100644
--- a/arch/cris/arch-v32/drivers/sync_serial.c
+++ b/arch/cris/arch-v32/drivers/sync_serial.c
@@ -1627,6 +1627,12 @@ static int __init etrax_sync_serial_init(void)
/* Create a sysfs class for syncser */
syncser_class = class_create(THIS_MODULE, "syncser_class");
+ if (IS_ERR(syncser_class)) {
+ pr_err("Failed to create a sysfs class for syncser\n");
+ unregister_chrdev_region(syncser_first, minor_count);
+ cdev_del(syncser_cdev);
+ return -1;
+ }
/* Initialize Ports */
#if defined(CONFIG_ETRAX_SYNCHRONOUS_SERIAL_PORT0)