char: misc: fix error path
authorSudip Mukherjee <sudipm.mukherjee@gmail.com>
Mon, 13 Jul 2015 12:02:28 +0000 (17:32 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 27 Jul 2015 17:30:47 +0000 (10:30 -0700)
commit1037b2787b6df12f31b7051f7cdbb289f7972ee7
tree8bde5d2469ea29dc36f00127a87d78dae2394615
parent344e62b36d3fa680ffbd35ee26b52f7bf4c1c4ec
char: misc: fix error path

Lets call remove_proc_entry() in the error path only if we have
successfully created "misc" in procfs.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/char/misc.c