Commit 63f7a797 authored by Matthias Beyer's avatar Matthias Beyer Committed by Greg Kroah-Hartman

Staging: bcm: Bcmchar.c: Renamed variable: "pWriteBuff" -> "write_buff"

Signed-off-by: default avatarMatthias Beyer <mail@beyermatthias.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b69e66bc
...@@ -1719,7 +1719,7 @@ static int bcm_char_ioctl_flash2x_section_write(void __user *argp, ...@@ -1719,7 +1719,7 @@ static int bcm_char_ioctl_flash2x_section_write(void __user *argp,
{ {
struct bcm_flash2x_readwrite sFlash2xWrite = {0}; struct bcm_flash2x_readwrite sFlash2xWrite = {0};
struct bcm_ioctl_buffer io_buff; struct bcm_ioctl_buffer io_buff;
PUCHAR pWriteBuff; PUCHAR write_buff;
void __user *InputAddr; void __user *InputAddr;
UINT NOB = 0; UINT NOB = 0;
UINT buff_size = 0; UINT buff_size = 0;
...@@ -1777,9 +1777,9 @@ static int bcm_char_ioctl_flash2x_section_write(void __user *argp, ...@@ -1777,9 +1777,9 @@ static int bcm_char_ioctl_flash2x_section_write(void __user *argp,
else else
buff_size = NOB; buff_size = NOB;
pWriteBuff = kmalloc(buff_size, GFP_KERNEL); write_buff = kmalloc(buff_size, GFP_KERNEL);
if (pWriteBuff == NULL) if (write_buff == NULL)
return -ENOMEM; return -ENOMEM;
/* extracting the remainder of the given offset. */ /* extracting the remainder of the given offset. */
...@@ -1801,25 +1801,25 @@ static int bcm_char_ioctl_flash2x_section_write(void __user *argp, ...@@ -1801,25 +1801,25 @@ static int bcm_char_ioctl_flash2x_section_write(void __user *argp,
BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL, BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL,
"Device is in Idle/Shutdown Mode\n"); "Device is in Idle/Shutdown Mode\n");
up(&ad->NVMRdmWrmLock); up(&ad->NVMRdmWrmLock);
kfree(pWriteBuff); kfree(write_buff);
return -EACCES; return -EACCES;
} }
BcmFlash2xCorruptSig(ad, sFlash2xWrite.Section); BcmFlash2xCorruptSig(ad, sFlash2xWrite.Section);
do { do {
status = copy_from_user(pWriteBuff, InputAddr, write_bytes); status = copy_from_user(write_buff, InputAddr, write_bytes);
if (status) { if (status) {
BCM_DEBUG_PRINT(ad, DBG_TYPE_PRINTK, 0, 0, BCM_DEBUG_PRINT(ad, DBG_TYPE_PRINTK, 0, 0,
"Copy to user failed with status :%d", status); "Copy to user failed with status :%d", status);
up(&ad->NVMRdmWrmLock); up(&ad->NVMRdmWrmLock);
kfree(pWriteBuff); kfree(write_buff);
return -EFAULT; return -EFAULT;
} }
BCM_DEBUG_PRINT_BUFFER(ad, DBG_TYPE_OTHERS, BCM_DEBUG_PRINT_BUFFER(ad, DBG_TYPE_OTHERS,
OSAL_DBG, DBG_LVL_ALL, pWriteBuff, write_bytes); OSAL_DBG, DBG_LVL_ALL, write_buff, write_bytes);
/* Writing the data from Flash 2.x */ /* Writing the data from Flash 2.x */
status = BcmFlash2xBulkWrite(ad, (PUINT)pWriteBuff, status = BcmFlash2xBulkWrite(ad, (PUINT)write_buff,
sFlash2xWrite.Section, sFlash2xWrite.Section,
WriteOffset, WriteOffset,
write_bytes, write_bytes,
...@@ -1844,7 +1844,7 @@ static int bcm_char_ioctl_flash2x_section_write(void __user *argp, ...@@ -1844,7 +1844,7 @@ static int bcm_char_ioctl_flash2x_section_write(void __user *argp,
BcmFlash2xWriteSig(ad, sFlash2xWrite.Section); BcmFlash2xWriteSig(ad, sFlash2xWrite.Section);
up(&ad->NVMRdmWrmLock); up(&ad->NVMRdmWrmLock);
kfree(pWriteBuff); kfree(write_buff);
return status; return status;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment