3665180795
Fix the following cppcheck findings. Privreq may be NULL, thus perform checks before using its member variables. Checking mpfs_usb.c ... mpfs_usb.c:1093:12: warning: Possible null pointer dereference: privreq [nullPointer] if ((privreq->inflight > 0) && (count != 0) && ^ mpfs_usb.c:1090:21: note: Assignment 'privreq=NULL', assigned value is 0 privreq = NULL; ^ mpfs_usb.c:1093:12: note: Null pointer dereference if ((privreq->inflight > 0) && (count != 0) && ^ mpfs_usb.c:1138:3: warning: Possible null pointer dereference: privreq [nullPointer] privreq->req.xfrd = 0; ^ mpfs_usb.c:1130:21: note: Assignment 'privreq=NULL', assigned value is 0 privreq = NULL; ^ mpfs_usb.c:1138:3: note: Null pointer dereference privreq->req.xfrd = 0; ^ mpfs_usb.c:1139:3: warning: Possible null pointer dereference: privreq [nullPointer] privreq->inflight = privreq->req.len; ^ mpfs_usb.c:1130:21: note: Assignment 'privreq=NULL', assigned value is 0 privreq = NULL; ^ mpfs_usb.c:1139:3: note: Null pointer dereference privreq->inflight = privreq->req.len; ^ mpfs_usb.c:1140:50: warning: Possible null pointer dereference: privreq [nullPointer] priv->eplist[epno].descb[0]->addr = (uintptr_t)privreq->req.buf; ^ mpfs_usb.c:1130:21: note: Assignment 'privreq=NULL', assigned value is 0 privreq = NULL; ^ mpfs_usb.c:1140:50: note: Null pointer dereference priv->eplist[epno].descb[0]->addr = (uintptr_t)privreq->req.buf; Signed-off-by: Eero Nurkkala <eero.nurkkala@offcode.fi> |
||
---|---|---|
.. | ||
include | ||
src | ||
Kconfig |