From: Wei Yongjun <[email protected]>

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

Signed-off-by: Wei Yongjun <[email protected]>
---
 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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to