From: Wen-chien Jesse Sung Date: Wed, 29 Jun 2005 03:44:41 +0000 (-0700) Subject: [PATCH] fix semaphore handling in __unregister_chrdev_region X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8d451687ca57371d303c5554b377d7f5c2ac6ae0;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git [PATCH] fix semaphore handling in __unregister_chrdev_region This up() should be down() instead. Signed-off-by: Wen-chien Jesse Sung Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/char_dev.c b/fs/char_dev.c index e82aac9cc2f..a69a5d8a406 100644 --- a/fs/char_dev.c +++ b/fs/char_dev.c @@ -150,7 +150,7 @@ __unregister_chrdev_region(unsigned major, unsigned baseminor, int minorct) struct char_device_struct *cd = NULL, **cp; int i = major_to_index(major); - up(&chrdevs_lock); + down(&chrdevs_lock); for (cp = &chrdevs[i]; *cp; cp = &(*cp)->next) if ((*cp)->major == major && (*cp)->baseminor == baseminor &&