stm class: Do not leak the chrdev in error path
authorAlexander Shishkin <alexander.shishkin@linux.intel.com>
Fri, 4 Mar 2016 14:36:10 +0000 (16:36 +0200)
committerAlexander Shishkin <alexander.shishkin@linux.intel.com>
Fri, 8 Apr 2016 13:11:52 +0000 (16:11 +0300)
commitcbe4a61d1ddc4790d950ca8c33ef79ee68ef5e2b
tree87c9756404d8959ec2b19ad6b974f48f14bd1c2a
parent8fa11d1c1322f3de40a0e3f3f3e57436a204fcc4
stm class: Do not leak the chrdev in error path

Currently, the error path of stm_register_device() forgets to unregister
the chrdev. Fix this.

Reported-by: Alan Cox <alan.cox@intel.com>
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Reviewed-by: Laurent Fert <laurent.fert@intel.com>
drivers/hwtracing/stm/core.c