]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
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>
Fri, 3 Aug 2018 05:47:54 +0000 (07:47 +0200)
commit4e04adf0f74aa40c3c24838d1f43cf6b0101020c
treec6a7be8d0c3182c8198435fda4e2803c863789ce
parent0225a1b338770d5d419242466dd0f4248c1c67c1
staging: most: cdev: fix chrdev_region leak

[ Upstream commit aba258b73101670c06b1dd700e500ed0a3fa0e8e ]

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>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/most/cdev/cdev.c