[patch] Staging: vt6655-6: potential NULL dereference in hostap_disable_hostapd()

2013-11-06 Thread Dan Carpenter
We fixed this to use free_netdev() instead of kfree() but unfortunately free_netdev() doesn't accept NULL pointers. Smatch complains about this, it's not something I discovered through testing. Fixes: 3030d40b5036 ('staging: vt6655: use free_netdev instead of kfree') Fixes: 0a438d5b381e ('staging

[patch] staging: nvec: potential NULL dereference on error path

2013-11-06 Thread Dan Carpenter
We assume nvec->rx can be NULL earlier so I have added a check here as well. Signed-off-by: Dan Carpenter diff --git a/drivers/staging/nvec/nvec.c b/drivers/staging/nvec/nvec.c index 3066ee2..c64e069 100644 --- a/drivers/staging/nvec/nvec.c +++ b/drivers/staging/nvec/nvec.c @@ -681,7 +681,8 @@ s

[PATCH] memstick: rtsx: fix ms card data transfer bug

2013-11-06 Thread micky_ching
From: Micky Ching This patch is used to add support for ms card. The main difference between ms card and mspro card is long data transfer mode. mspro card can use auto mode DMA for long data transfer, but ms can not use this mode, it should use normal mode DMA. The memstick core add support for

Re: [PATCH] memstick: rtsx: fix ms card data transfer bug

2013-11-06 Thread Andrew Morton
On Wed, 6 Nov 2013 09:14:59 +0800 micky wrote: > On 11/06/2013 05:10 AM, Andrew Morton wrote: > > On Wed, 30 Oct 2013 14:40:16 +0800 wrote: > > > >> unlike mspro card, ms card use normal read/write mode for DMA > >> data transfer. > > What are the user-visible effects of this bug? > > > > Please

[PATCH] staging: comedi: s626: fix value written by s626_set_dac()

2013-11-06 Thread Ian Abbott
I broke `s626_set_dac()` by changing the type of the `dacdata` parameter from `short` to `unsigned short`. It's actually designed to take a signed value in the range -0x1fff to +0x2000 although values above 0x1fff get clamped to 0x1fff. (We could change the `maxdata` value to 0x1ffe to avoid the

re: staging: comedi: das800: tidy up das800_interrupt()

2013-11-06 Thread Dan Carpenter
Hello H Hartley Sweeten, This is a semi-automatic email about new static checker warnings. The patch 7f340859f26e: "staging: comedi: das800: tidy up das800_interrupt()" from Apr 22, 2013, leads to the following Smatch complaint: drivers/staging/comedi/drivers/das800.c:509 das800_interrupt()

re: staging: comedi: s626: sample types are unsigned

2013-11-06 Thread Dan Carpenter
Hello Ian Abbott, The patch 5fd4b711be48: "staging: comedi: s626: sample types are unsigned" from Oct 16, 2013, leads to the following static checker warning: "drivers/staging/comedi/drivers/s626.c:508 s626_set_dac() warn: impossible condition '(dacdata < 0) => (0-65535 < 0)'" drivers/st

Re: [PATCH] staging: new asus fan driver

2013-11-06 Thread Matthew Garrett
On Wed, Nov 06, 2013 at 12:55:56AM -0800, Greg Kroah-Hartman wrote: > Matthew, please don't push drivers to the staging tree that have no > problems on their own, and don't require work within them to get out of > staging, as that doesn't help much, as I don't want to take code that > has to wait

[PATCH] lustre/fld: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO

2013-11-06 Thread Duan Jiong
This patch fixes coccinelle error regarding usage of IS_ERR and PTR_ERR instead of PTR_ERR_OR_ZERO. Signed-off-by: Duan Jiong --- drivers/staging/lustre/lustre/fld/fld_request.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/staging/lustre/lustre/fld/fld_request.

Re: [PATCH] staging: new asus fan driver

2013-11-06 Thread Greg Kroah-Hartman
On Tue, Nov 05, 2013 at 08:52:38PM -0600, Felipe Contreras wrote: > On Tue, Nov 5, 2013 at 8:19 PM, Greg Kroah-Hartman > wrote: > > On Tue, Nov 05, 2013 at 01:54:51PM -0600, Felipe Contreras wrote: > >> On Tue, Nov 5, 2013 at 9:16 AM, Greg Kroah-Hartman > >> wrote: > >> > On Tue, Nov 05, 2013 at

[PATCH] block: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO

2013-11-06 Thread Duan Jiong
This patch fixes coccinelle error regarding usage of IS_ERR and PTR_ERR instead of PTR_ERR_OR_ZERO. Signed-off-by: Duan Jiong --- block/ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/ioctl.c b/block/ioctl.c index a31d91d..7d5c3b2 100644 --- a/block/ioctl.c +++

[PATCH] block: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO

2013-11-06 Thread Duan Jiong
This patch fixes coccinelle error regarding usage of IS_ERR and PTR_ERR instead of PTR_ERR_OR_ZERO. Signed-off-by: Duan Jiong --- block/blk-timeout.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/blk-timeout.c b/block/blk-timeout.c index 4e9cfd1..cdf5711 100644 --- a/

[PATCH] smsc: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO

2013-11-06 Thread Duan Jiong
This patch fixes coccinelle error regarding usage of IS_ERR and PTR_ERR instead of PTR_ERR_OR_ZERO. Signed-off-by: Duan Jiong --- drivers/net/ethernet/smsc/smc9194.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/net/ethernet/smsc/smc9194.c b/drivers/net/ethernet

[PATCH] net:drivers/net: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO

2013-11-06 Thread Duan Jiong
This patch fixes coccinelle error regarding usage of IS_ERR and PTR_ERR instead of PTR_ERR_OR_ZERO. Signed-off-by: Duan Jiong --- drivers/net/ethernet/i825xx/82596.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/net/ethernet/i825xx/82596.c b/drivers/net/ethernet

[PATCH] block: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO

2013-11-06 Thread Duan Jiong
This patch fixes coccinelle error regarding usage of IS_ERR and PTR_ERR instead of PTR_ERR_OR_ZERO. Signed-off-by: Duan Jiong --- block/blk-timeout.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/blk-timeout.c b/block/blk-timeout.c index 4e9cfd1..cdf5711 100644 --- a/

[PATCH] block: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO

2013-11-06 Thread Duan Jiong
This patch fixes coccinelle error regarding usage of IS_ERR and PTR_ERR instead of PTR_ERR_OR_ZERO. Signed-off-by: Duan Jiong --- block/ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/ioctl.c b/block/ioctl.c index a31d91d..7d5c3b2 100644 --- a/block/ioctl.c +++