From: Henry Ptasinski <henryp@xxxxxxxxxxxx> Also eliminate a cast to int that could cause issues with very large values of di->rxbufsize (as suggested by Dan Carpenter). Signed-off-by: Henry Ptasinski <henryp@xxxxxxxxxxxx> Signed-off-by: Roland Vossen <rvossen@xxxxxxxxxxxx> --- drivers/staging/brcm80211/brcmsmac/dma.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/staging/brcm80211/brcmsmac/dma.c b/drivers/staging/brcm80211/brcmsmac/dma.c index 8859a77..6d9a0fe 100644 --- a/drivers/staging/brcm80211/brcmsmac/dma.c +++ b/drivers/staging/brcm80211/brcmsmac/dma.c @@ -917,7 +917,7 @@ struct sk_buff *dma_rx(struct dma_pub *pub) tail = head; while ((resid > 0) && (p = _dma_getnextrxp(di, false))) { tail->next = p; - pkt_len = min(resid, (int)di->rxbufsize); + pkt_len = min_t(uint, resid, di->rxbufsize); __skb_trim(p, pkt_len); tail = p; -- 1.7.4.1 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/devel