Skip to content

Commit

Permalink
staging: sep: add missing misc_deregister() on error in sep_register_…
Browse files Browse the repository at this point in the history
…driver_with_fs()

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@trendmicro.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Wei Yongjun authored and Greg Kroah-Hartman committed Oct 27, 2013
1 parent 6756bb7 commit a5b7151
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/staging/sep/sep_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit a5b7151

Please sign in to comment.