From c1f5ac8375d57f9f98ae11436819707cbd3ac6d0 Mon Sep 17 00:00:00 2001 From: Jose Alonso Date: Sun, 10 Jul 2011 15:46:51 -0300 Subject: [PATCH] dell-laptop - using buffer without mutex_lock Using buffer->output[1] without mutex_lock() Signed-off-by: Jose Alonso Signed-off-by: Matthew Garrett --- drivers/platform/x86/dell-laptop.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/platform/x86/dell-laptop.c b/drivers/platform/x86/dell-laptop.c index 1b99152a4eb9..f31fa4efa725 100644 --- a/drivers/platform/x86/dell-laptop.c +++ b/drivers/platform/x86/dell-laptop.c @@ -540,11 +540,11 @@ static int dell_get_intensity(struct backlight_device *bd) else dell_send_request(buffer, 0, 1); + ret = buffer->output[1]; + out: release_buffer(); - if (ret) - return ret; - return buffer->output[1]; + return ret; } static const struct backlight_ops dell_ops = { -- 2.39.5