summaryrefslogtreecommitdiff
path: root/drivers/platform/x86/dell_rbu.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/platform/x86/dell_rbu.c')
-rw-r--r--drivers/platform/x86/dell_rbu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/platform/x86/dell_rbu.c b/drivers/platform/x86/dell_rbu.c
index 8104ca0c44ca..031c68903583 100644
--- a/drivers/platform/x86/dell_rbu.c
+++ b/drivers/platform/x86/dell_rbu.c
@@ -436,6 +436,7 @@ static int img_update_realloc(unsigned long size)
ordernum = get_order(size);
image_update_buffer =
(unsigned char *)__get_free_pages(GFP_DMA32, ordernum);
+ spin_lock(&rbu_data.lock);
if (!image_update_buffer) {
pr_debug("Not enough memory for image update:"
"size = %ld\n", size);
@@ -446,7 +447,6 @@ static int img_update_realloc(unsigned long size)
if (WARN_ON_ONCE(img_buf_phys_addr > BIOS_SCAN_LIMIT))
return -EINVAL; /* can't happen per definition */
- spin_lock(&rbu_data.lock);
rbu_data.image_update_buffer = image_update_buffer;
rbu_data.image_update_buffer_size = size;
rbu_data.bios_image_size = rbu_data.image_update_buffer_size;