[PATCH 06/11] staging: rtl8188eu: (*pfwlen + n) replaced by roundup(*pfwlen, 4)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This can be proved rigorously, but get long.

Signed-off-by: Ivan Safonov <insafonov@xxxxxxxxx>
---
 drivers/staging/rtl8188eu/hal/fw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8188eu/hal/fw.c b/drivers/staging/rtl8188eu/hal/fw.c
index f153387..70011bd 100644
--- a/drivers/staging/rtl8188eu/hal/fw.c
+++ b/drivers/staging/rtl8188eu/hal/fw.c
@@ -89,7 +89,7 @@ static void _rtl88e_fill_dummy(u8 *pfwbuf, u32 *pfwlen)
 	remain = (remain == 0) ? 0 : (4 - remain);
 	n = remain;
 
-	for (; fwlen < *pfwlen + n; fwlen++) {
+	for (; fwlen < roundup(*pfwlen, 4); fwlen++) {
 		pfwbuf[fwlen] = 0;
 	}
 
-- 
2.4.10

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux