Skip to content

Commit

Permalink
netxen_nic: signedness bug in netxen_md_entry_err_chk()
Browse files Browse the repository at this point in the history
"esize" should be signed because it can be negative here.  For example,
when we call it in netxen_parse_md_template(), it could be -1 from the
return value of netxen_md_L2Cache().

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Dan Carpenter authored and David S. Miller committed Feb 9, 2012
1 parent 039055b commit a584b7a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/qlogic/netxen/netxen_nic_hw.c
Original file line number Diff line number Diff line change
Expand Up @@ -2354,7 +2354,7 @@ netxen_md_rdqueue(struct netxen_adapter *adapter,
*/

static int netxen_md_entry_err_chk(struct netxen_adapter *adapter,
struct netxen_minidump_entry *entry, u32 esize)
struct netxen_minidump_entry *entry, int esize)
{
if (esize < 0) {
entry->hdr.driver_flags |= NX_DUMP_SKIP;
Expand Down

0 comments on commit a584b7a

Please sign in to comment.