Skip to content

Commit 1868821

Browse files
committed
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: USB: gadget: fix EEM gadget CRC usage USB: otg Kconfig: let USB_OTG_UTILS select USB_ULPI option USB: g_multi: fix CONFIG_USB_G_MULTI_RNDIS usage kfifo: Don't use integer as NULL pointer USB: FHCI: Fix build after kfifo rework kfifo: Make kfifo_initialized work after kfifo_free USB: serial: add usbid for dell wwan card to sierra.c USB: SIS USB2VGA DRIVER: support KAIREN's USB VGA adaptor USB20SVGA-MB-PLUS USB: ehci: phy low power mode bug fixing USB: s3c-hsotg: Export usb_gadget_register_driver() USB: r8a66597-udc: Prototype IS_ERR() and PTR_ERR() USB: ftdi_sio: add device IDs (several ELV, one Mindstorms NXT) USB: storage: Remove unneeded SC/PR from unusual_devs.h USB: ftdi_sio: new device id for papouch AD4USB USB: usbfs: properly clean up the as structure on error paths USB: usbfs: only copy the actual data received
2 parents 1ed10aa + 31e5d4a commit 1868821

File tree

15 files changed

+92
-35
lines changed

15 files changed

+92
-35
lines changed

drivers/usb/core/devio.c

Lines changed: 30 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1312,9 +1312,9 @@ static int processcompl(struct async *as, void __user * __user *arg)
13121312
void __user *addr = as->userurb;
13131313
unsigned int i;
13141314

1315-
if (as->userbuffer)
1315+
if (as->userbuffer && urb->actual_length)
13161316
if (copy_to_user(as->userbuffer, urb->transfer_buffer,
1317-
urb->transfer_buffer_length))
1317+
urb->actual_length))
13181318
goto err_out;
13191319
if (put_user(as->status, &userurb->status))
13201320
goto err_out;
@@ -1334,14 +1334,11 @@ static int processcompl(struct async *as, void __user * __user *arg)
13341334
}
13351335
}
13361336

1337-
free_async(as);
1338-
13391337
if (put_user(addr, (void __user * __user *)arg))
13401338
return -EFAULT;
13411339
return 0;
13421340

13431341
err_out:
1344-
free_async(as);
13451342
return -EFAULT;
13461343
}
13471344

@@ -1371,20 +1368,28 @@ static struct async *reap_as(struct dev_state *ps)
13711368
static int proc_reapurb(struct dev_state *ps, void __user *arg)
13721369
{
13731370
struct async *as = reap_as(ps);
1374-
if (as)
1375-
return processcompl(as, (void __user * __user *)arg);
1371+
if (as) {
1372+
int retval = processcompl(as, (void __user * __user *)arg);
1373+
free_async(as);
1374+
return retval;
1375+
}
13761376
if (signal_pending(current))
13771377
return -EINTR;
13781378
return -EIO;
13791379
}
13801380

13811381
static int proc_reapurbnonblock(struct dev_state *ps, void __user *arg)
13821382
{
1383+
int retval;
13831384
struct async *as;
13841385

1385-
if (!(as = async_getcompleted(ps)))
1386-
return -EAGAIN;
1387-
return processcompl(as, (void __user * __user *)arg);
1386+
as = async_getcompleted(ps);
1387+
retval = -EAGAIN;
1388+
if (as) {
1389+
retval = processcompl(as, (void __user * __user *)arg);
1390+
free_async(as);
1391+
}
1392+
return retval;
13881393
}
13891394

13901395
#ifdef CONFIG_COMPAT
@@ -1475,9 +1480,9 @@ static int processcompl_compat(struct async *as, void __user * __user *arg)
14751480
void __user *addr = as->userurb;
14761481
unsigned int i;
14771482

1478-
if (as->userbuffer)
1483+
if (as->userbuffer && urb->actual_length)
14791484
if (copy_to_user(as->userbuffer, urb->transfer_buffer,
1480-
urb->transfer_buffer_length))
1485+
urb->actual_length))
14811486
return -EFAULT;
14821487
if (put_user(as->status, &userurb->status))
14831488
return -EFAULT;
@@ -1497,7 +1502,6 @@ static int processcompl_compat(struct async *as, void __user * __user *arg)
14971502
}
14981503
}
14991504

1500-
free_async(as);
15011505
if (put_user(ptr_to_compat(addr), (u32 __user *)arg))
15021506
return -EFAULT;
15031507
return 0;
@@ -1506,20 +1510,28 @@ static int processcompl_compat(struct async *as, void __user * __user *arg)
15061510
static int proc_reapurb_compat(struct dev_state *ps, void __user *arg)
15071511
{
15081512
struct async *as = reap_as(ps);
1509-
if (as)
1510-
return processcompl_compat(as, (void __user * __user *)arg);
1513+
if (as) {
1514+
int retval = processcompl_compat(as, (void __user * __user *)arg);
1515+
free_async(as);
1516+
return retval;
1517+
}
15111518
if (signal_pending(current))
15121519
return -EINTR;
15131520
return -EIO;
15141521
}
15151522

15161523
static int proc_reapurbnonblock_compat(struct dev_state *ps, void __user *arg)
15171524
{
1525+
int retval;
15181526
struct async *as;
15191527

1520-
if (!(as = async_getcompleted(ps)))
1521-
return -EAGAIN;
1522-
return processcompl_compat(as, (void __user * __user *)arg);
1528+
retval = -EAGAIN;
1529+
as = async_getcompleted(ps);
1530+
if (as) {
1531+
retval = processcompl_compat(as, (void __user * __user *)arg);
1532+
free_async(as);
1533+
}
1534+
return retval;
15231535
}
15241536

15251537

drivers/usb/gadget/f_eem.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ static struct sk_buff *eem_wrap(struct gether *port, struct sk_buff *skb)
358358
* b15: bmType (0 == data)
359359
*/
360360
len = skb->len;
361-
put_unaligned_le16((len & 0x3FFF) | BIT(14), skb_push(skb, 2));
361+
put_unaligned_le16(len & 0x3FFF, skb_push(skb, 2));
362362

363363
/* add a zero-length EEM packet, if needed */
364364
if (padlen)
@@ -464,7 +464,6 @@ static int eem_unwrap(struct gether *port,
464464
}
465465

466466
/* validate CRC */
467-
crc = get_unaligned_le32(skb->data + len - ETH_FCS_LEN);
468467
if (header & BIT(14)) {
469468
crc = get_unaligned_le32(skb->data + len
470469
- ETH_FCS_LEN);

drivers/usb/gadget/multi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
#if defined USB_ETH_RNDIS
3030
# undef USB_ETH_RNDIS
3131
#endif
32-
#ifdef CONFIG_USB_ETH_RNDIS
32+
#ifdef CONFIG_USB_G_MULTI_RNDIS
3333
# define USB_ETH_RNDIS y
3434
#endif
3535

drivers/usb/gadget/r8a66597-udc.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
#include <linux/io.h>
2727
#include <linux/platform_device.h>
2828
#include <linux/clk.h>
29+
#include <linux/err.h>
2930

3031
#include <linux/usb/ch9.h>
3132
#include <linux/usb/gadget.h>

drivers/usb/gadget/s3c-hsotg.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2582,6 +2582,7 @@ int usb_gadget_register_driver(struct usb_gadget_driver *driver)
25822582
hsotg->gadget.dev.driver = NULL;
25832583
return ret;
25842584
}
2585+
EXPORT_SYMBOL(usb_gadget_register_driver);
25852586

25862587
int usb_gadget_unregister_driver(struct usb_gadget_driver *driver)
25872588
{

drivers/usb/host/ehci-hub.c

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,9 @@ static int ehci_bus_suspend (struct usb_hcd *hcd)
196196
if (hostpc_reg) {
197197
u32 t3;
198198

199+
spin_unlock_irq(&ehci->lock);
199200
msleep(5);/* 5ms for HCD enter low pwr mode */
201+
spin_lock_irq(&ehci->lock);
200202
t3 = ehci_readl(ehci, hostpc_reg);
201203
ehci_writel(ehci, t3 | HOSTPC_PHCD, hostpc_reg);
202204
t3 = ehci_readl(ehci, hostpc_reg);
@@ -904,17 +906,18 @@ static int ehci_hub_control (
904906
if ((temp & PORT_PE) == 0
905907
|| (temp & PORT_RESET) != 0)
906908
goto error;
907-
ehci_writel(ehci, temp | PORT_SUSPEND, status_reg);
909+
908910
/* After above check the port must be connected.
909911
* Set appropriate bit thus could put phy into low power
910912
* mode if we have hostpc feature
911913
*/
914+
temp &= ~PORT_WKCONN_E;
915+
temp |= PORT_WKDISC_E | PORT_WKOC_E;
916+
ehci_writel(ehci, temp | PORT_SUSPEND, status_reg);
912917
if (hostpc_reg) {
913-
temp &= ~PORT_WKCONN_E;
914-
temp |= (PORT_WKDISC_E | PORT_WKOC_E);
915-
ehci_writel(ehci, temp | PORT_SUSPEND,
916-
status_reg);
918+
spin_unlock_irqrestore(&ehci->lock, flags);
917919
msleep(5);/* 5ms for HCD enter low pwr mode */
920+
spin_lock_irqsave(&ehci->lock, flags);
918921
temp1 = ehci_readl(ehci, hostpc_reg);
919922
ehci_writel(ehci, temp1 | HOSTPC_PHCD,
920923
hostpc_reg);

drivers/usb/host/fhci-tds.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ void fhci_ep0_free(struct fhci_usb *usb)
105105
if (ep->td_base)
106106
cpm_muram_free(cpm_muram_offset(ep->td_base));
107107

108-
if (ep->conf_frame_Q) {
108+
if (kfifo_initialized(&ep->conf_frame_Q)) {
109109
size = cq_howmany(&ep->conf_frame_Q);
110110
for (; size; size--) {
111111
struct packet *pkt = cq_get(&ep->conf_frame_Q);
@@ -115,7 +115,7 @@ void fhci_ep0_free(struct fhci_usb *usb)
115115
cq_delete(&ep->conf_frame_Q);
116116
}
117117

118-
if (ep->empty_frame_Q) {
118+
if (kfifo_initialized(&ep->empty_frame_Q)) {
119119
size = cq_howmany(&ep->empty_frame_Q);
120120
for (; size; size--) {
121121
struct packet *pkt = cq_get(&ep->empty_frame_Q);
@@ -125,7 +125,7 @@ void fhci_ep0_free(struct fhci_usb *usb)
125125
cq_delete(&ep->empty_frame_Q);
126126
}
127127

128-
if (ep->dummy_packets_Q) {
128+
if (kfifo_initialized(&ep->dummy_packets_Q)) {
129129
size = cq_howmany(&ep->dummy_packets_Q);
130130
for (; size; size--) {
131131
u8 *buff = cq_get(&ep->dummy_packets_Q);

drivers/usb/misc/sisusbvga/sisusb.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3245,6 +3245,7 @@ static struct usb_device_id sisusb_table [] = {
32453245
{ USB_DEVICE(0x0711, 0x0902) },
32463246
{ USB_DEVICE(0x0711, 0x0903) },
32473247
{ USB_DEVICE(0x0711, 0x0918) },
3248+
{ USB_DEVICE(0x0711, 0x0920) },
32483249
{ USB_DEVICE(0x182d, 0x021c) },
32493250
{ USB_DEVICE(0x182d, 0x0269) },
32503251
{ }

drivers/usb/otg/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ config ISP1301_OMAP
4444
config USB_ULPI
4545
bool "Generic ULPI Transceiver Driver"
4646
depends on ARM
47+
select USB_OTG_UTILS
4748
help
4849
Enable this to support ULPI connected USB OTG transceivers which
4950
are likely found on embedded boards.

drivers/usb/serial/ftdi_sio.c

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
* Version Information
5151
*/
5252
#define DRIVER_VERSION "v1.5.0"
53-
#define DRIVER_AUTHOR "Greg Kroah-Hartman <[email protected]>, Bill Ryder <[email protected]>, Kuba Ober <[email protected]>"
53+
#define DRIVER_AUTHOR "Greg Kroah-Hartman <[email protected]>, Bill Ryder <[email protected]>, Kuba Ober <[email protected]>, Andreas Mohr"
5454
#define DRIVER_DESC "USB FTDI Serial Converters Driver"
5555

5656
static int debug;
@@ -145,10 +145,15 @@ static struct ftdi_sio_quirk ftdi_HE_TIRA1_quirk = {
145145

146146

147147

148+
/*
149+
* Device ID not listed? Test via module params product/vendor or
150+
* /sys/bus/usb/ftdi_sio/new_id, then send patch/report!
151+
*/
148152
static struct usb_device_id id_table_combined [] = {
149153
{ USB_DEVICE(FTDI_VID, FTDI_AMC232_PID) },
150154
{ USB_DEVICE(FTDI_VID, FTDI_CANUSB_PID) },
151155
{ USB_DEVICE(FTDI_VID, FTDI_CANDAPTER_PID) },
156+
{ USB_DEVICE(FTDI_VID, FTDI_NXTCAM_PID) },
152157
{ USB_DEVICE(FTDI_VID, FTDI_SCS_DEVICE_0_PID) },
153158
{ USB_DEVICE(FTDI_VID, FTDI_SCS_DEVICE_1_PID) },
154159
{ USB_DEVICE(FTDI_VID, FTDI_SCS_DEVICE_2_PID) },
@@ -552,9 +557,16 @@ static struct usb_device_id id_table_combined [] = {
552557
{ USB_DEVICE(FTDI_VID, FTDI_IBS_PEDO_PID) },
553558
{ USB_DEVICE(FTDI_VID, FTDI_IBS_PROD_PID) },
554559
/*
555-
* Due to many user requests for multiple ELV devices we enable
556-
* them by default.
560+
* ELV devices:
557561
*/
562+
{ USB_DEVICE(FTDI_VID, FTDI_ELV_USR_PID) },
563+
{ USB_DEVICE(FTDI_VID, FTDI_ELV_MSM1_PID) },
564+
{ USB_DEVICE(FTDI_VID, FTDI_ELV_KL100_PID) },
565+
{ USB_DEVICE(FTDI_VID, FTDI_ELV_WS550_PID) },
566+
{ USB_DEVICE(FTDI_VID, FTDI_ELV_EC3000_PID) },
567+
{ USB_DEVICE(FTDI_VID, FTDI_ELV_WS888_PID) },
568+
{ USB_DEVICE(FTDI_VID, FTDI_ELV_TWS550_PID) },
569+
{ USB_DEVICE(FTDI_VID, FTDI_ELV_FEM_PID) },
558570
{ USB_DEVICE(FTDI_VID, FTDI_ELV_CLI7000_PID) },
559571
{ USB_DEVICE(FTDI_VID, FTDI_ELV_PPS7330_PID) },
560572
{ USB_DEVICE(FTDI_VID, FTDI_ELV_TFM100_PID) },
@@ -571,11 +583,17 @@ static struct usb_device_id id_table_combined [] = {
571583
{ USB_DEVICE(FTDI_VID, FTDI_ELV_PCK100_PID) },
572584
{ USB_DEVICE(FTDI_VID, FTDI_ELV_RFP500_PID) },
573585
{ USB_DEVICE(FTDI_VID, FTDI_ELV_FS20SIG_PID) },
586+
{ USB_DEVICE(FTDI_VID, FTDI_ELV_UTP8_PID) },
574587
{ USB_DEVICE(FTDI_VID, FTDI_ELV_WS300PC_PID) },
588+
{ USB_DEVICE(FTDI_VID, FTDI_ELV_WS444PC_PID) },
575589
{ USB_DEVICE(FTDI_VID, FTDI_ELV_FHZ1300PC_PID) },
576590
{ USB_DEVICE(FTDI_VID, FTDI_ELV_EM1010PC_PID) },
577591
{ USB_DEVICE(FTDI_VID, FTDI_ELV_WS500_PID) },
578592
{ USB_DEVICE(FTDI_VID, FTDI_ELV_HS485_PID) },
593+
{ USB_DEVICE(FTDI_VID, FTDI_ELV_UMS100_PID) },
594+
{ USB_DEVICE(FTDI_VID, FTDI_ELV_TFD128_PID) },
595+
{ USB_DEVICE(FTDI_VID, FTDI_ELV_FM3RX_PID) },
596+
{ USB_DEVICE(FTDI_VID, FTDI_ELV_WS777_PID) },
579597
{ USB_DEVICE(FTDI_VID, LINX_SDMUSBQSS_PID) },
580598
{ USB_DEVICE(FTDI_VID, LINX_MASTERDEVEL2_PID) },
581599
{ USB_DEVICE(FTDI_VID, LINX_FUTURE_0_PID) },
@@ -697,6 +715,7 @@ static struct usb_device_id id_table_combined [] = {
697715
{ USB_DEVICE(RATOC_VENDOR_ID, RATOC_PRODUCT_ID_USB60F) },
698716
{ USB_DEVICE(FTDI_VID, FTDI_REU_TINY_PID) },
699717
{ USB_DEVICE(PAPOUCH_VID, PAPOUCH_QUIDO4x4_PID) },
718+
{ USB_DEVICE(PAPOUCH_VID, PAPOUCH_AD4USB_PID) },
700719
{ USB_DEVICE(FTDI_VID, FTDI_DOMINTELL_DGQG_PID) },
701720
{ USB_DEVICE(FTDI_VID, FTDI_DOMINTELL_DUSB_PID) },
702721
{ USB_DEVICE(ALTI2_VID, ALTI2_N3_PID) },

drivers/usb/serial/ftdi_sio_ids.h

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@
3838
/* www.candapter.com Ewert Energy Systems CANdapter device */
3939
#define FTDI_CANDAPTER_PID 0x9F80 /* Product Id */
4040

41+
#define FTDI_NXTCAM_PID 0xABB8 /* NXTCam for Mindstorms NXT */
42+
4143
/* OOCDlink by Joern Kaipf <[email protected]>
4244
* (http://www.joernonline.de/dw/doku.php?id=start&idx=projects:oocdlink) */
4345
#define FTDI_OOCDLINK_PID 0xbaf8 /* Amontec JTAGkey */
@@ -161,22 +163,37 @@
161163
/*
162164
* ELV USB devices submitted by Christian Abt of ELV (www.elv.de).
163165
* All of these devices use FTDI's vendor ID (0x0403).
166+
* Further IDs taken from ELV Windows .inf file.
164167
*
165168
* The previously included PID for the UO 100 module was incorrect.
166169
* In fact, that PID was for ELV's UR 100 USB-RS232 converter (0xFB58).
167170
*
168171
* Armin Laeuger originally sent the PID for the UM 100 module.
169172
*/
173+
#define FTDI_ELV_USR_PID 0xE000 /* ELV Universal-Sound-Recorder */
174+
#define FTDI_ELV_MSM1_PID 0xE001 /* ELV Mini-Sound-Modul */
175+
#define FTDI_ELV_KL100_PID 0xE002 /* ELV Kfz-Leistungsmesser KL 100 */
176+
#define FTDI_ELV_WS550_PID 0xE004 /* WS 550 */
177+
#define FTDI_ELV_EC3000_PID 0xE006 /* ENERGY CONTROL 3000 USB */
178+
#define FTDI_ELV_WS888_PID 0xE008 /* WS 888 */
179+
#define FTDI_ELV_TWS550_PID 0xE009 /* Technoline WS 550 */
180+
#define FTDI_ELV_FEM_PID 0xE00A /* Funk Energie Monitor */
170181
#define FTDI_ELV_FHZ1300PC_PID 0xE0E8 /* FHZ 1300 PC */
171182
#define FTDI_ELV_WS500_PID 0xE0E9 /* PC-Wetterstation (WS 500) */
172183
#define FTDI_ELV_HS485_PID 0xE0EA /* USB to RS-485 adapter */
184+
#define FTDI_ELV_UMS100_PID 0xE0EB /* ELV USB Master-Slave Schaltsteckdose UMS 100 */
185+
#define FTDI_ELV_TFD128_PID 0xE0EC /* ELV Temperatur-Feuchte-Datenlogger TFD 128 */
186+
#define FTDI_ELV_FM3RX_PID 0xE0ED /* ELV Messwertuebertragung FM3 RX */
187+
#define FTDI_ELV_WS777_PID 0xE0EE /* Conrad WS 777 */
173188
#define FTDI_ELV_EM1010PC_PID 0xE0EF /* Engery monitor EM 1010 PC */
174189
#define FTDI_ELV_CSI8_PID 0xE0F0 /* Computer-Schalt-Interface (CSI 8) */
175190
#define FTDI_ELV_EM1000DL_PID 0xE0F1 /* PC-Datenlogger fuer Energiemonitor (EM 1000 DL) */
176191
#define FTDI_ELV_PCK100_PID 0xE0F2 /* PC-Kabeltester (PCK 100) */
177192
#define FTDI_ELV_RFP500_PID 0xE0F3 /* HF-Leistungsmesser (RFP 500) */
178193
#define FTDI_ELV_FS20SIG_PID 0xE0F4 /* Signalgeber (FS 20 SIG) */
194+
#define FTDI_ELV_UTP8_PID 0xE0F5 /* ELV UTP 8 */
179195
#define FTDI_ELV_WS300PC_PID 0xE0F6 /* PC-Wetterstation (WS 300 PC) */
196+
#define FTDI_ELV_WS444PC_PID 0xE0F7 /* Conrad WS 444 PC */
180197
#define FTDI_PHI_FISCO_PID 0xE40B /* PHI Fisco USB to Serial cable */
181198
#define FTDI_ELV_UAD8_PID 0xF068 /* USB-AD-Wandler (UAD 8) */
182199
#define FTDI_ELV_UDA7_PID 0xF069 /* USB-DA-Wandler (UDA 7) */
@@ -968,6 +985,7 @@
968985
#define PAPOUCH_VID 0x5050 /* Vendor ID */
969986
#define PAPOUCH_TMU_PID 0x0400 /* TMU USB Thermometer */
970987
#define PAPOUCH_QUIDO4x4_PID 0x0900 /* Quido 4/4 Module */
988+
#define PAPOUCH_AD4USB_PID 0x8003 /* AD4USB Measurement Module */
971989

972990
/*
973991
* Marvell SheevaPlug

drivers/usb/serial/sierra.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,7 @@ static struct usb_device_id id_table [] = {
298298
{ USB_DEVICE(0x1199, 0x68A3), /* Sierra Wireless Direct IP modems */
299299
.driver_info = (kernel_ulong_t)&direct_ip_interface_blacklist
300300
},
301+
{ USB_DEVICE(0x413C, 0x08133) }, /* Dell Computer Corp. Wireless 5720 VZW Mobile Broadband (EVDO Rev-A) Minicard GPS Port */
301302

302303
{ }
303304
};

drivers/usb/storage/unusual_devs.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -941,7 +941,7 @@ UNUSUAL_DEV( 0x07ab, 0xfccd, 0x0000, 0x9999,
941941
UNUSUAL_DEV( 0x07af, 0x0004, 0x0100, 0x0133,
942942
"Microtech",
943943
"USB-SCSI-DB25",
944-
US_SC_SCSI, US_PR_BULK, usb_stor_euscsi_init,
944+
US_SC_DEVICE, US_PR_DEVICE, usb_stor_euscsi_init,
945945
US_FL_SCM_MULT_TARG ),
946946

947947
UNUSUAL_DEV( 0x07af, 0x0005, 0x0100, 0x0100,

include/linux/kfifo.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ extern __must_check unsigned int kfifo_out_peek(struct kfifo *fifo,
124124
*/
125125
static inline bool kfifo_initialized(struct kfifo *fifo)
126126
{
127-
return fifo->buffer != 0;
127+
return fifo->buffer != NULL;
128128
}
129129

130130
/**

0 commit comments

Comments
 (0)