aboutsummaryrefslogtreecommitdiff
path: root/drivers/scsi/mpt2sas/mpi/mpi2_tool.h
diff options
context:
space:
mode:
authorTobias Klauser <[email protected]>2014-08-14 13:59:42 +0200
committerDavid S. Miller <[email protected]>2014-08-14 14:38:54 -0700
commit9b9ba821b6c47b6d1a711b8f6fff931277217bab (patch)
tree19fe44ecda226e216ba2c2bb21f897144f897873 /drivers/scsi/mpt2sas/mpi/mpi2_tool.h
parent9d186cac7ffb1831e9f34cb4a3a8b22abb9dd9d4 (diff)
net: xgene: Check negative return value of xgene_enet_get_ring_size()
xgene_enet_get_ring_size() returns a negative value in case of an error, but its only caller in xgene_enet_create_desc_ring() currently uses the return value directly as u32. Instead, check for a negative value first and error out in case. Also move the call to xgene_enet_get_ring_size() before devm_kzalloc() so we don't need to free anything in the error path. This fixes the following issue reported by the Coverity Scanner: ** CID 1231336: Improper use of negative value (NEGATIVE_RETURNS) /drivers/net/ethernet/apm/xgene/xgene_enet_main.c: 596 in xgene_enet_create_desc_ring() Signed-off-by: Tobias Klauser <[email protected]> Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'drivers/scsi/mpt2sas/mpi/mpi2_tool.h')
0 files changed, 0 insertions, 0 deletions