staging: most: cdev: fix chrdev_region leak
authorChristian Gromm <christian.gromm@microchip.com>
Tue, 8 May 2018 09:45:06 +0000 (11:45 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 8 May 2018 11:41:50 +0000 (13:41 +0200)
commitaba258b73101670c06b1dd700e500ed0a3fa0e8e
treee404148985fa552be5efa4ffd2dc5c43aa295af6
parent8463d9fab6e25a77b640caada74af29f936a8ea4
staging: most: cdev: fix chrdev_region leak

The function unregister_chrdev_region is called with a different counter
as the alloc_chrdev_region. To fix this, this patch introduces the
constant CHRDEV_REGION_SIZE that is used in both functions.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/most/cdev/cdev.c