/********************************************************************* * * Filename: crc.h * Version: * Description: CRC routines * Status: Experimental. * Author: Dag Brattli * Created at: Mon Aug 4 20:40:53 1997 * Modified at: Sun May 2 20:25:23 1999 * Modified by: Dag Brattli * ********************************************************************/ #ifndef IRDA_CRC_H #define IRDA_CRC_H #include #include #define INIT_FCS 0xffff /* Initial FCS value */ #define GOOD_FCS 0xf0b8 /* Good final FCS value */ /* Recompute the FCS with one more character appended. */ #define irda_fcs(fcs, c) crc_ccitt_byte(fcs, c) /* Recompute the FCS with len bytes appended. */ #define irda_calc_crc16(fcs, buf, len) crc_ccitt(fcs, buf, len) #endif input type='hidden' name='id' value='51920830d9d0eb617af18dc60443fcd4fb50a533'/> net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPan Bian <bianpan2016@163.com>2016-12-03 19:24:48 +0800
committerDavid S. Miller <davem@davemloft.net>2016-12-05 13:27:15 -0500
commit51920830d9d0eb617af18dc60443fcd4fb50a533 (patch)
tree39c0d78a3843af8ec383be5c34b396fa9fb88b63
parentb59589635ff01cc25270360709eeeb5c45c6abb9 (diff)
net: usb: set error code when usb_alloc_urb fails
In function lan78xx_probe(), variable ret takes the errno code on failures. However, when the call to usb_alloc_urb() fails, its value will keeps 0. 0 indicates success in the context, which is inconsistent with the execution result. This patch fixes the bug, assigning "-ENOMEM" to ret when usb_alloc_urb() returns a NULL pointer. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=188771 Signed-off-by: Pan Bian <bianpan2016@163.com> Acked-by: Woojung Huh <woojung.huh@microchip.com> Signed-off-by: David S. Miller <davem@davemloft.net>