[PATCH] staging: rtl8822be: Keep array subscript no lower than zero

2017-09-23 Thread Larry Finger
The kbuild test robot reports the following: drivers/staging//rtlwifi/phydm/phydm_dig.c: In function 'odm_pause_dig': drivers/staging//rtlwifi/phydm/phydm_dig.c:494:45: warning: array subscript is below array bounds [-Warray-bounds] odm_write_dig(dm, dig_tab->pause_dig_value[max_level]

Re: [PATCH v2] staging: bcm2835-audio: Fix memory corruption

2017-09-23 Thread Stefan Wahren
Hi Phil, > Greg Kroah-Hartman hat am 23. September 2017 um > 18:15 geschrieben: > > > On Sat, Sep 23, 2017 at 12:57:33PM +0200, Stefan Wahren wrote: > > Hi Greg, > > > > > Phil Elwell hat am 11. August 2017 um 12:20 > > > geschrieben: > > > > > > > > > The previous commit (0adbfd46) fixed

[PATCH] au1k_ir.c fix warning: Prefer [subsystem eg: netdev]_info([subsystem]dev, ...

2017-09-23 Thread Yurii Pavlenko
This patch fixes the following checkpatch.pl warning: fix Prefer [subsystem eg: netdev]_info([subsystem]dev, ... then dev_info(dev, ... then pr_info(... to printk(KERN_INFO ... Signed-off-by: Yurii Pavlenko --- drivers/staging/irda/drivers/au1k_ir.c | 40 +++--- 1 fi

[PATCH] staging/atomisp: make six local functions static to appease sparse

2017-09-23 Thread Muhammad Falak R Wani
The functions __bo_alloc, __bo_search_and_remove_from_free_rbtree, __bo_search_by_addr, __bo_search_by_addr_in_range, __bo_break_up and __bo_merge are local to the source and do not need to be in the global scope, so make them static. Cleans up sparse warnings: warning: symbol '__bo_alloc' was n

Re: [PATCH v2] staging: bcm2835-audio: Fix memory corruption

2017-09-23 Thread Greg Kroah-Hartman
On Sat, Sep 23, 2017 at 12:57:33PM +0200, Stefan Wahren wrote: > Hi Greg, > > > Phil Elwell hat am 11. August 2017 um 12:20 > > geschrieben: > > > > > > The previous commit (0adbfd46) fixed a memory leak but also freed a > > block in the success case, causing a stale pointer to be used with >

Re: [PATCH v2] staging: bcm2835-audio: Fix memory corruption

2017-09-23 Thread Stefan Wahren
Hi Greg, > Phil Elwell hat am 11. August 2017 um 12:20 > geschrieben: > > > The previous commit (0adbfd46) fixed a memory leak but also freed a > block in the success case, causing a stale pointer to be used with > potentially fatal results. Only free the vchi_instance block in the > case that

[PATCH] staging: greybus: light: remove unnecessary error check

2017-09-23 Thread Arvind Yadav
It is not necessary to check return value of gb_lights_channel_flash_config. gb_lights_channel_config returns both successful and error value. Signed-off-by: Arvind Yadav --- drivers/staging/greybus/light.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/staging/

[PATCH v3] staging: greybus: light: Release memory obtained by kasprintf

2017-09-23 Thread Arvind Yadav
Free memory region, if gb_lights_channel_config is not successful. Signed-off-by: Arvind Yadav --- changes in v2: - Subject line changed. - add kfree in __gb_lights_led_unregister(). - No need to check return value of gb_lights_channel_flash_config(). changes