[DTV00857290][DTV][Coverity Scanned Code Defect]

[Description]
Fix coverity defects under nic/nic.c

Fix Out-of-bounds write.
 - Cid#361517 in line 1686.

Fix Dereference before null check.
 - Cid#16352 in line 804.
 Remove unused function 'nicGetPendingStaMMPDU' in nic.c and nic.h.

Fix Wrong operator used
 - Cid#15089 in line 2602, 2604, 2615, 2617, 2628, 2630, 2641, 2643, 
   2654, 2656, 2667, 2669, 2680, 2682, 2693, 2695.

Fix Unused value
 - Cid#70777 in line 1455, 1459, 1462, 1465.
 - Cid#70778 in line 1456, 1460, 1463, 1466.

Change-Id: Icde98d8fc9e2dbb42ae9b52b48c12a28ea963c6d
Signed-off-by: Alice Ou <alice.ou@mediatek.com>
(cherry picked from commit 0a3a6c4ac6cd13596f651a8b9ebf0257c0f336c8)
CR-Id: DTV00857290
(cherry picked from commit 3ded0366a956b70f4c10e463fd93381b85f36938)
(cherry picked from commit 8e46eb6f6b8ac09d49483b342e2bf1a010460c8c)
2 files changed