[PATCH -next] staging: sep: add missing misc_deregister() on error in sep_register_driver_with_fs()

From: Wei Yongjun
Date: Mon Oct 21 2013 - 01:34:15 EST


From: Wei Yongjun <yongjun_wei@xxxxxxxxxxxxxxxxx>

Add the missing misc_deregister() before return from
sep_register_driver_with_fs() in the error handling case.

Signed-off-by: Wei Yongjun <yongjun_wei@xxxxxxxxxxxxxxxxx>
---
drivers/staging/sep/sep_main.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/staging/sep/sep_main.c b/drivers/staging/sep/sep_main.c
index 11f5b21..5f8c0a8 100644
--- a/drivers/staging/sep/sep_main.c
+++ b/drivers/staging/sep/sep_main.c
@@ -4075,6 +4075,7 @@ static int sep_register_driver_with_fs(struct sep_device *sep)
if (ret_val) {
dev_warn(&sep->pdev->dev, "sysfs attribute1 fails for SEP %x\n",
ret_val);
+ misc_deregister(&sep->miscdev_sep);
return ret_val;
}


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/