From: Dan Carpenter Date: Tue, 7 Feb 2012 23:23:36 +0000 (+0000) Subject: netxen_nic: signedness bug in netxen_md_entry_err_chk() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a584b7ae4ef01425f6827657abdc3e4db49b3578;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git netxen_nic: signedness bug in netxen_md_entry_err_chk() "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 Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/qlogic/netxen/netxen_nic_hw.c b/drivers/net/ethernet/qlogic/netxen/netxen_nic_hw.c index 0a8122851025..6f37470750f3 100644 --- a/drivers/net/ethernet/qlogic/netxen/netxen_nic_hw.c +++ b/drivers/net/ethernet/qlogic/netxen/netxen_nic_hw.c @@ -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;