]> git.karo-electronics.de Git - linux-beck.git/commit
staging: sw_sync: Fix error paths
authorRebecca Schultz Zavin <rebecca@android.com>
Fri, 1 Mar 2013 00:43:13 +0000 (16:43 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 4 Mar 2013 09:44:08 +0000 (17:44 +0800)
commit03e7a503561f6d0ef09c7ec73772a7a6f78417d3
treef581807c0e97d8875540084be6a7a7e40facb648
parent92ea915adb5565b522902a7b3f0a33ede16bb797
staging: sw_sync: Fix error paths

Check the return value of get_unused_fd to make sure a valid
file descriptor is returned.

Make sure to call put_unused_fd even if an error occurs before
the fd can be used.

Cc: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Cc: Erik Gilling <konkers@android.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Rob Clark <robclark@gmail.com>
Cc: Sumit Semwal <sumit.semwal@linaro.org>
Cc: dri-devel@lists.freedesktop.org
Cc: Android Kernel Team <kernel-team@android.com>
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/android/sw_sync.c