Skip to content

Commit 31795c4

Browse files
committed
Merge tag 'staging-3.12-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging
Pull staging fixes from Greg KH: "Here are some staging driver fixes, MAINTAINER updates, and a new device id. All of these have been in the linux-next tree, and are pretty simple patches" * tag 'staging-3.12-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: staging: r8188eu: Add new device ID staging: imx-drm: Fix probe failure staging: vt6656: [BUG] iwctl_siwencodeext return if device not open staging: vt6656: [BUG] main_usb.c oops on device_close move flag earlier. staging: vt6656: rxtx.c [BUG] s_vGetFreeContext dead lock on null apTD. Staging: rtl8192u: r819xU_cmdpkt: checking NULL value after doing dev_alloc_skb staging: usbip: Orphan usbip staging: r8188eu: Add files for new drive: Cocci spatch "noderef" staging: r8188eu: Cocci spatch "noderef" staging: octeon-usb: Cocci spatch "noderef" staging: r8188eu: Add files for new drive: Cocci spatch "noderef" MAINTAINERS: staging: dgnc and dgap drivers: add maintainer staging: lustre: Cocci spatch "noderef"
2 parents 434ac47 + df3f4ed commit 31795c4

File tree

12 files changed

+31
-16
lines changed

12 files changed

+31
-16
lines changed

MAINTAINERS

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2640,6 +2640,18 @@ F: include/linux/device-mapper.h
26402640
F: include/linux/dm-*.h
26412641
F: include/uapi/linux/dm-*.h
26422642

2643+
DIGI NEO AND CLASSIC PCI PRODUCTS
2644+
M: Lidza Louina <lidza.louina@gmail.com>
2645+
L: driverdev-devel@linuxdriverproject.org
2646+
S: Maintained
2647+
F: drivers/staging/dgnc/
2648+
2649+
DIGI EPCA PCI PRODUCTS
2650+
M: Lidza Louina <lidza.louina@gmail.com>
2651+
L: driverdev-devel@linuxdriverproject.org
2652+
S: Maintained
2653+
F: drivers/staging/dgap/
2654+
26432655
DIOLAN U2C-12 I2C DRIVER
26442656
M: Guenter Roeck <linux@roeck-us.net>
26452657
L: linux-i2c@vger.kernel.org
@@ -8725,9 +8737,8 @@ F: Documentation/hid/hiddev.txt
87258737
F: drivers/hid/usbhid/
87268738

87278739
USB/IP DRIVERS
8728-
M: Matt Mooney <mfm@muteddisk.com>
87298740
L: linux-usb@vger.kernel.org
8730-
S: Maintained
8741+
S: Orphan
87318742
F: drivers/staging/usbip/
87328743

87338744
USB ISP116X DRIVER

drivers/staging/imx-drm/imx-drm-core.c

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ struct imx_drm_device {
4141
struct list_head encoder_list;
4242
struct list_head connector_list;
4343
struct mutex mutex;
44-
int references;
4544
int pipes;
4645
struct drm_fbdev_cma *fbhelper;
4746
};
@@ -241,8 +240,6 @@ struct drm_device *imx_drm_device_get(void)
241240
}
242241
}
243242

244-
imxdrm->references++;
245-
246243
return imxdrm->drm;
247244

248245
unwind_crtc:
@@ -280,8 +277,6 @@ void imx_drm_device_put(void)
280277
list_for_each_entry(enc, &imxdrm->encoder_list, list)
281278
module_put(enc->owner);
282279

283-
imxdrm->references--;
284-
285280
mutex_unlock(&imxdrm->mutex);
286281
}
287282
EXPORT_SYMBOL_GPL(imx_drm_device_put);
@@ -485,7 +480,7 @@ int imx_drm_add_crtc(struct drm_crtc *crtc,
485480

486481
mutex_lock(&imxdrm->mutex);
487482

488-
if (imxdrm->references) {
483+
if (imxdrm->drm->open_count) {
489484
ret = -EBUSY;
490485
goto err_busy;
491486
}
@@ -564,7 +559,7 @@ int imx_drm_add_encoder(struct drm_encoder *encoder,
564559

565560
mutex_lock(&imxdrm->mutex);
566561

567-
if (imxdrm->references) {
562+
if (imxdrm->drm->open_count) {
568563
ret = -EBUSY;
569564
goto err_busy;
570565
}
@@ -709,7 +704,7 @@ int imx_drm_add_connector(struct drm_connector *connector,
709704

710705
mutex_lock(&imxdrm->mutex);
711706

712-
if (imxdrm->references) {
707+
if (imxdrm->drm->open_count) {
713708
ret = -EBUSY;
714709
goto err_busy;
715710
}

drivers/staging/lustre/lustre/obdecho/echo_client.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1387,7 +1387,7 @@ echo_copyout_lsm (struct lov_stripe_md *lsm, void *_ulsm, int ulsm_nob)
13871387
if (nob > ulsm_nob)
13881388
return (-EINVAL);
13891389

1390-
if (copy_to_user (ulsm, lsm, sizeof(ulsm)))
1390+
if (copy_to_user (ulsm, lsm, sizeof(*ulsm)))
13911391
return (-EFAULT);
13921392

13931393
for (i = 0; i < lsm->lsm_stripe_count; i++) {

drivers/staging/octeon-usb/cvmx-usb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -604,7 +604,7 @@ int cvmx_usb_initialize(struct cvmx_usb_state *state, int usb_port_number,
604604
}
605605
}
606606

607-
memset(usb, 0, sizeof(usb));
607+
memset(usb, 0, sizeof(*usb));
608608
usb->init_flags = flags;
609609

610610
/* Initialize the USB state structure */

drivers/staging/rtl8188eu/core/rtw_mp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -907,7 +907,7 @@ u32 mp_query_psd(struct adapter *pAdapter, u8 *data)
907907
sscanf(data, "pts =%d, start =%d, stop =%d", &psd_pts, &psd_start, &psd_stop);
908908
}
909909

910-
_rtw_memset(data, '\0', sizeof(data));
910+
_rtw_memset(data, '\0', sizeof(*data));
911911

912912
i = psd_start;
913913
while (i < psd_stop) {

drivers/staging/rtl8188eu/hal/rtl8188e_dm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ static void Init_ODM_ComInfo_88E(struct adapter *Adapter)
5757
u8 cut_ver, fab_ver;
5858

5959
/* Init Value */
60-
_rtw_memset(dm_odm, 0, sizeof(dm_odm));
60+
_rtw_memset(dm_odm, 0, sizeof(*dm_odm));
6161

6262
dm_odm->Adapter = Adapter;
6363

drivers/staging/rtl8188eu/os_dep/ioctl_linux.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6973,7 +6973,7 @@ static int rtw_mp_ctx(struct net_device *dev,
69736973
stop = strncmp(extra, "stop", 4);
69746974
sscanf(extra, "count =%d, pkt", &count);
69756975

6976-
_rtw_memset(extra, '\0', sizeof(extra));
6976+
_rtw_memset(extra, '\0', sizeof(*extra));
69776977

69786978
if (stop == 0) {
69796979
bStartTest = 0; /* To set Stop */

drivers/staging/rtl8188eu/os_dep/usb_intf.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ static struct usb_device_id rtw_usb_id_tbl[] = {
5454
/*=== Customer ID ===*/
5555
/****** 8188EUS ********/
5656
{USB_DEVICE(0x8179, 0x07B8)}, /* Abocom - Abocom */
57+
{USB_DEVICE(0x2001, 0x330F)}, /* DLink DWA-125 REV D1 */
5758
{} /* Terminating entry */
5859
};
5960

drivers/staging/rtl8192u/r819xU_cmdpkt.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ rt_status SendTxCommandPacket(struct net_device *dev, void *pData, u32 DataLen)
3737
/* Get TCB and local buffer from common pool.
3838
(It is shared by CmdQ, MgntQ, and USB coalesce DataQ) */
3939
skb = dev_alloc_skb(USB_HWDESC_HEADER_LEN + DataLen + 4);
40+
if (!skb)
41+
return RT_STATUS_FAILURE;
4042
memcpy((unsigned char *)(skb->cb), &dev, sizeof(dev));
4143
tcb_desc = (cb_desc *)(skb->cb + MAX_DEV_ADDR_SIZE);
4244
tcb_desc->queue_index = TXCMD_QUEUE;

drivers/staging/vt6656/iwctl.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1634,6 +1634,9 @@ int iwctl_siwencodeext(struct net_device *dev, struct iw_request_info *info,
16341634
if (pMgmt == NULL)
16351635
return -EFAULT;
16361636

1637+
if (!(pDevice->flags & DEVICE_FLAGS_OPENED))
1638+
return -ENODEV;
1639+
16371640
buf = kzalloc(sizeof(struct viawget_wpa_param), GFP_KERNEL);
16381641
if (buf == NULL)
16391642
return -ENOMEM;

drivers/staging/vt6656/main_usb.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1098,6 +1098,8 @@ static int device_close(struct net_device *dev)
10981098
memset(pMgmt->abyCurrBSSID, 0, 6);
10991099
pMgmt->eCurrState = WMAC_STATE_IDLE;
11001100

1101+
pDevice->flags &= ~DEVICE_FLAGS_OPENED;
1102+
11011103
device_free_tx_bufs(pDevice);
11021104
device_free_rx_bufs(pDevice);
11031105
device_free_int_bufs(pDevice);
@@ -1109,7 +1111,6 @@ static int device_close(struct net_device *dev)
11091111
usb_free_urb(pDevice->pInterruptURB);
11101112

11111113
BSSvClearNodeDBTable(pDevice, 0);
1112-
pDevice->flags &=(~DEVICE_FLAGS_OPENED);
11131114

11141115
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "device_close2 \n");
11151116

drivers/staging/vt6656/rxtx.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,8 @@ static void *s_vGetFreeContext(struct vnt_private *pDevice)
148148
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"GetFreeContext()\n");
149149

150150
for (ii = 0; ii < pDevice->cbTD; ii++) {
151+
if (!pDevice->apTD[ii])
152+
return NULL;
151153
pContext = pDevice->apTD[ii];
152154
if (pContext->bBoolInUse == false) {
153155
pContext->bBoolInUse = true;

0 commit comments

Comments
 (0)