Commit 137b9938 authored by Prasanna Karthik's avatar Prasanna Karthik Committed by Greg Kroah-Hartman

staging:wilc1000: code cleanup Fix reported by coccinelle

Removed {} for single statement if block
Signed-off-by: default avatarPrasanna Karthik <mkarthi3@visteon.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b3a02832
...@@ -31,11 +31,10 @@ u32 FIFO_DeInit(tHANDLE hFifo) ...@@ -31,11 +31,10 @@ u32 FIFO_DeInit(tHANDLE hFifo)
u32 u32Error = 0; u32 u32Error = 0;
tstrFifoHandler *pstrFifoHandler = (tstrFifoHandler *) hFifo; tstrFifoHandler *pstrFifoHandler = (tstrFifoHandler *) hFifo;
if (pstrFifoHandler) { if (pstrFifoHandler) {
if (pstrFifoHandler->pu8Buffer) { if (pstrFifoHandler->pu8Buffer)
WILC_FREE (pstrFifoHandler->pu8Buffer); WILC_FREE (pstrFifoHandler->pu8Buffer);
} else { else
u32Error = 1; u32Error = 1;
}
WILC_FREE (pstrFifoHandler); WILC_FREE (pstrFifoHandler);
} else { } else {
...@@ -52,11 +51,11 @@ u32 FIFO_ReadBytes(tHANDLE hFifo, u8 *pu8Buffer, u32 u32BytesToRead, u32 *pu32By ...@@ -52,11 +51,11 @@ u32 FIFO_ReadBytes(tHANDLE hFifo, u8 *pu8Buffer, u32 u32BytesToRead, u32 *pu32By
if (pstrFifoHandler->u32TotalBytes) { if (pstrFifoHandler->u32TotalBytes) {
down(&pstrFifoHandler->SemBuffer); down(&pstrFifoHandler->SemBuffer);
if (u32BytesToRead > pstrFifoHandler->u32TotalBytes) { if (u32BytesToRead > pstrFifoHandler->u32TotalBytes)
*pu32BytesRead = pstrFifoHandler->u32TotalBytes; *pu32BytesRead = pstrFifoHandler->u32TotalBytes;
} else { else
*pu32BytesRead = u32BytesToRead; *pu32BytesRead = u32BytesToRead;
}
if ((pstrFifoHandler->u32ReadOffset + u32BytesToRead) <= pstrFifoHandler->u32BufferLength) { if ((pstrFifoHandler->u32ReadOffset + u32BytesToRead) <= pstrFifoHandler->u32BufferLength) {
WILC_memcpy(pu8Buffer, pstrFifoHandler->pu8Buffer + pstrFifoHandler->u32ReadOffset, WILC_memcpy(pu8Buffer, pstrFifoHandler->pu8Buffer + pstrFifoHandler->u32ReadOffset,
*pu32BytesRead); *pu32BytesRead);
......
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