[PATCH v2] gpu: host1x: Fix compiler errors by converting to dma_addr_t

2018-05-16 Thread Emil Goode
dma_alloc_wc(). Also check pb->mapped for non-NULL in the destroy function as that is the right way of checking if dma_alloc_wc() was successful. Signed-off-by: Emil Goode --- v2: - Change the phys member type instead of adding casts. - Check pb->mapped in the destroy function as 0 is a valid

Re: [PATCH] gpu: host1x: Fix compiler errors

2018-05-15 Thread Emil Goode
Hello, On Mon, May 14, 2018 at 10:43:08AM +0200, Thierry Reding wrote: > On Mon, Mar 26, 2018 at 04:44:14PM +0200, Emil Goode wrote: > > The compiler is complaining with the following errors: > > > > drivers/gpu/host1x/cdma.c:94:48: error: > > passing argume

Re: [PATCH] gpu: host1x: Fix compiler errors

2018-03-26 Thread Emil Goode
Hello, On Mon, Mar 26, 2018 at 04:57:34PM +0200, Thierry Reding wrote: > On Mon, Mar 26, 2018 at 04:44:14PM +0200, Emil Goode wrote: > > The compiler is complaining with the following errors: > > > > drivers/gpu/host1x/cdma.c:94:48: error: > > passing argume

[PATCH] gpu: host1x: Fix compiler errors

2018-03-26 Thread Emil Goode
‘dma_alloc_wc’ from incompatible pointer type [-Werror=incompatible-pointer-types] The expected pointer type of the third argument to dma_alloc_wc() is dma_addr_t but phys_addr_t is passed. Fix this by adding casts to the expected pointer type. Signed-off-by: Emil Goode --- drivers/gpu/host1x

Re: wlcore: Fix regression in wlcore_set_partition()

2016-02-24 Thread Emil Goode
gt; >>>>> Reverting the > >>>>> changes regarding write of the last partition size brings the module > >>>>> back to > >>>>> it's functional state. > >>>>> > >>>>> Fixes: 3719c17e1816

[PATCH] wlcore: Fix regression in wlcore_set_partition()

2016-02-09 Thread Emil Goode
unctional state. Reported-by: Ross Green Signed-off-by: Emil Goode --- drivers/net/wireless/ti/wlcore/io.c | 8 drivers/net/wireless/ti/wlcore/io.h | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/net/wireless/ti/wlcore/io.c b/drivers/net/wireless/ti/wl

Re: wl12xx regression on 4.5 (was: Re: linux-4.5-rc1 TI pandboard-es wifi wlcore locks and reset)

2016-02-08 Thread Emil Goode
Hello Ross, On Mon, Feb 08, 2016 at 07:26:34PM +1100, Ross Green wrote: > On Mon, Feb 8, 2016 at 9:05 AM, Emil Goode wrote: > > Hello, > > > > On Tue, Feb 02, 2016 at 05:05:38PM +0100, Sebastian Reichel wrote: > >> On Tue, Feb 02, 2016 at 04:41:13PM +1100, Ross Gre

Re: wl12xx regression on 4.5 (was: Re: linux-4.5-rc1 TI pandboard-es wifi wlcore locks and reset)

2016-02-07 Thread Emil Goode
> Here is a dmesg dump in the attachment. > > >> > > > >> > Anyone have any ideas here? > > > > [...] > > > > If I get time, this evening, I'll see if I can give a bisect a try. > > On N950 [wl1271 via SPI, using extra patches to i

Re: [PATCH] brcmfmac: Fix off by one bug in brcmf_count_20mhz_channels()

2014-09-22 Thread Emil Goode
:58, Emil Goode wrote: > >In the brcmf_count_20mhz_channels function we are looping through a list > >of channels received from firmware. Since the index of the first channel > >is 0 the condition leads to an off by one bug. This is causing us to hit > >the W

[PATCH v2] brcmfmac: Fix off by one bug in brcmf_count_20mhz_channels()

2014-09-22 Thread Emil Goode
discovered the bug. Introduced by: commit b48d891676f756d48b4d0ee131e4a7a5d43ca417 ("brcmfmac: rework wiphy structure setup") Acked-by: Arend van Spriel Signed-off-by: Emil Goode --- v2: Added Arends "Acked-by" tag. drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c |

Re: [PATCH] brcmfmac: Fix off by one bug in brcmf_count_20mhz_channels()

2014-09-22 Thread Emil Goode
Hello Arend, Ok I will resend with your ack. Best regards, Emil On Mon, Sep 22, 2014 at 11:49:56AM +0200, Arend van Spriel wrote: > On 09/21/14 00:58, Emil Goode wrote: > >In the brcmf_count_20mhz_channels function we are looping through a list > >of channels received from firm

[PATCH] brcmfmac: Fix off by one bug in brcmf_count_20mhz_channels()

2014-09-20 Thread Emil Goode
discovered the bug. Introduced by: commit b48d891676f756d48b4d0ee131e4a7a5d43ca417 ("brcmfmac: rework wiphy structure setup") Signed-off-by: Emil Goode --- drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/d

Re: [PATCH] usb: usb5303: make use of uninitialized err variable

2014-07-10 Thread Emil Goode
Hello Greg and Geert, On Thu, Jul 10, 2014 at 09:38:00AM +0200, Geert Uytterhoeven wrote: > Hi Greg, > > On Thu, Jul 10, 2014 at 12:46 AM, Greg Kroah-Hartman > wrote: > > On Mon, Jun 02, 2014 at 07:45:25PM +0200, Emil Goode wrote: > >> The variable err is not initia

Re: [PATCH v2] MIPS: Fix incorrect NULL check in local_flush_tlb_page()

2014-07-06 Thread Emil Goode
Hello Maciej, I didn't know it was possible to go beyond commit 1da177e, thank you for the info. Best regards, Emil On Sun, Jul 06, 2014 at 12:16:38PM +0100, Maciej W. Rozycki wrote: > On Sun, 6 Jul 2014, Emil Goode wrote: > > > > > diff --git a/arch/mips/mm/tlb-r3k.c b

[PATCH] MIPS: Remove incorrect NULL check in local_flush_tlb_page()

2014-07-05 Thread Emil Goode
local_flush_tlb_page() don't bother checking if vma is NULL, also vma is dereferenced before being passed to local_flush_tlb_page(), thus it is safe to remove this NULL check. Signed-off-by: Emil Goode --- arch/mips/mm/tlb-r3k.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch

Re: [PATCH v2] MIPS: Fix incorrect NULL check in local_flush_tlb_page()

2014-07-05 Thread Emil Goode
Hello, On Sat, Jul 05, 2014 at 09:10:44PM +0200, Jonas Gorski wrote: > On Sat, Jul 5, 2014 at 8:26 PM, Emil Goode wrote: > > We check that the struct vm_area_struct pointer vma is NULL and then > > dereference it a few lines below. The intent must have been to make sure > >

[PATCH v2] MIPS: Fix incorrect NULL check in local_flush_tlb_page()

2014-07-05 Thread Emil Goode
We check that the struct vm_area_struct pointer vma is NULL and then dereference it a few lines below. The intent must have been to make sure that vma is not NULL and then to check the value from cpu_context() for the condition to be true. Signed-off-by: Emil Goode --- v2: Updated the commit

Re: [PATCH] MIPS: Fix incorrect NULL check in local_flush_tlb_page()

2014-07-04 Thread Emil Goode
Hello Jonas, On Fri, Jul 04, 2014 at 11:52:51PM +0200, Jonas Gorski wrote: > On Fri, Jul 4, 2014 at 7:07 PM, Emil Goode wrote: > > We check that the struct vm_area_struct pointer vma is NULL and > > then dereference it. The intent must have been to check that > > vma

Re: [PATCH v3] i2c: busses: i2c-pxa.c: Fix for possible null pointer dereferenc

2014-07-04 Thread Emil Goode
Hello, I noticed one more thing. On Fri, Jul 04, 2014 at 07:07:48PM +0200, Rickard Strandqvist wrote: > 2014-07-04 11:10 GMT+02:00 Emil Goode : > > Hello Rickard, > > > > Since this is a probe function there is also no need to release the devm_* > > resources in the i2

[PATCH] MIPS: Fix incorrect NULL check in local_flush_tlb_page()

2014-07-04 Thread Emil Goode
We check that the struct vm_area_struct pointer vma is NULL and then dereference it. The intent must have been to check that vma is not NULL before we dereference it in the next condition. Signed-off-by: Emil Goode --- arch/mips/mm/tlb-r3k.c |2 +- 1 file changed, 1 insertion(+), 1 deletion

Re: [PATCH v3] i2c: busses: i2c-pxa.c: Fix for possible null pointer dereferenc

2014-07-04 Thread Emil Goode
goto emalloc; Same here. > } > > i2c_pxa_reset(i2c); > @@ -1261,15 +1262,9 @@ static int i2c_pxa_probe(struct platform_device *dev) > eadapt: > if (!i2c->use_pio) > free_irq(irq, i2c); The free_irq() call should also be removed since devm_r

Re: [PATCH] Staging: rtl8192e: Fix potential NULL pointer dereference

2014-07-02 Thread Emil Goode
Hello Greg, On Wed, Jul 02, 2014 at 09:33:34AM -0700, Greg Kroah-Hartman wrote: > On Wed, Jul 02, 2014 at 11:25:51AM +0200, Emil Goode wrote: > > We need to make sure the struct rtllib_device pointer ieee is not NULL > > after the goto rx_dropped label since it is der

[PATCH] Staging: rtl8192e: Fix potential NULL pointer dereference

2014-07-02 Thread Emil Goode
We need to make sure the struct rtllib_device pointer ieee is not NULL after the goto rx_dropped label since it is dereferenced there. Signed-off-by: Emil Goode --- drivers/staging/rtl8192e/rtllib_rx.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging

[PATCH] [SCSI] qla2xxx: Remove duplicate __iomem annotation

2014-07-01 Thread Emil Goode
/scsi/qla2xxx/qla_dbg.c:632:22: warning: duplicate [noderef] drivers/scsi/qla2xxx/qla_target.c:1435:22: warning: duplicate [noderef] Introduced by commit: f73cb695d3eccd171f03ed194e72d67732b17487 ("[SCSI] qla2xxx: Add support for ISP2071.") Signed-off-by: Emil Goode --- drivers/sc

[PATCH 2/2] [media] Cleanup line > 80 character violations

2014-06-24 Thread Emil Goode
This cleans up some line over 80 character violations. Signed-off-by: Emil Goode --- drivers/media/dvb-frontends/stb6100_cfg.h | 12 drivers/media/dvb-frontends/tda8261_cfg.h |9 ++--- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/drivers/media/dvb

[PATCH 1/2] [media] Remove checks of struct member addresses

2014-06-24 Thread Emil Goode
This removes checks of struct member addresses since they likely result in the condition always being true. Also in the stb6100_get_bandwidth and tda8261_get_bandwidth functions the pointers frontend_ops and tuner_ops are assigned the same addresses twice. Signed-off-by: Emil Goode --- drivers

[PATCH] video: Remove kfree call since devm_kzalloc() is used

2014-06-20 Thread Emil Goode
We use devm_kzalloc() to allocate memory for the struct vt8500lcd_info pointer fbi, so there is no need to free it in vt8500lcd_remove(). Signed-off-by: Emil Goode --- drivers/video/fbdev/vt8500lcdfb.c |2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/video/fbdev/vt8500lcdfb.c b

[PATCH] usb: usb5303: make use of uninitialized err variable

2014-06-02 Thread Emil Goode
The variable err is not initialized here, this patch uses it to store an eventual error value from devm_clk_get(). Signed-off-by: Emil Goode --- drivers/usb/misc/usb3503.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/usb/misc/usb3503.c b/drivers/usb

[PATCH] NFC: st21nfca: Remove double assignment of .owner in struct device_driver

2014-06-02 Thread Emil Goode
The .owner member of struct device_driver is assigned THIS_MODULE twice. Introduced by: commit c44cb2edd01ca31471d9385f0895891b006ab904 ("NFC: dts: st21nfca: Add device-tree (Open Firmware) support to st21nfca") Signed-off-by: Emil Goode --- drivers/nfc/st21nfca/i2c.c |1 - 1 fi

[PATCH] stmmac: Remove spin_lock call in stmmac_get_pauseparam()

2014-06-02 Thread Emil Goode
: driver: stmicro: Remove some useless the lock protection This introduced the following sparse warning: drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c:424:1: warning: context imbalance in 'stmmac_get_pauseparam' - different lock contexts for basic block Signed-off-by:

[PATCH v2] mfd: fix unintentional NULL check in menelaus_set_voltage()

2014-05-28 Thread Emil Goode
. commit 59a9f7a32adf6537b4e4db8ca204eeb77d7a634e ("mfd: menelaus: Use NULL instead of 0") Signed-off-by: Emil Goode --- v2: Changed (vtg_val == 0) to (!vtg_val) drivers/mfd/menelaus.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mfd/menelaus.c b/d

Re: [PATCH] mfd: fix unintentional NULL check in menelaus_set_voltage()

2014-05-28 Thread Emil Goode
Hello, On Wed, May 28, 2014 at 04:20:11PM +0100, Lee Jones wrote: > On Wed, 28 May 2014, Emil Goode wrote: > > > The struct menelaus_vtg pointer vtg cannot be NULL here > > so the condition is never true and if it ever was true > > it would lead to a NULL pointer

[PATCH] mfd: fix unintentional NULL check in menelaus_set_voltage()

2014-05-28 Thread Emil Goode
. commit 59a9f7a32adf6537b4e4db8ca204eeb77d7a634e ("mfd: menelaus: Use NULL instead of 0") Signed-off-by: Emil Goode --- Hello, This is only build tested, it would be good to get a comment from someone who is familiar with this code. Found using coccinelle. Best regards, Emil Goode d

Re: [PATCH 1/3] driver core/platform: don't leak memory allocated for dma_mask

2014-05-26 Thread Emil Goode
Hello, On Mon, May 26, 2014 at 10:30:46PM +0300, Dan Carpenter wrote: > On Mon, May 26, 2014 at 06:41:21PM +0200, Emil Goode wrote: > > diff --git a/drivers/base/platform.c b/drivers/base/platform.c > > index 9e9227e..dd1fa07 100644 > > --- a/drivers/base/platform.c &

Re: [PATCH 1/3] driver core/platform: don't leak memory allocated for dma_mask

2014-05-26 Thread Emil Goode
Hello Russell, On Mon, May 26, 2014 at 05:51:05PM +0100, Russell King - ARM Linux wrote: > On Mon, May 26, 2014 at 06:41:21PM +0200, Emil Goode wrote: > > @@ -211,6 +215,7 @@ struct platform_device *platform_device_alloc(const > > char *name, int id) > >

[PATCH 2/3] driver core/platform: make .name of struct platform_object a C99 flexible array

2014-05-26 Thread Emil Goode
split the original patch, updated changelog and generated new data structure layout info] Signed-off-by: Emil Goode --- drivers/base/platform.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/base/platform.c b/drivers/base/platform.c index dd1fa07..ba98219 10

[PATCH 3/3] ARM: imx: don't allocate memory for .dma_mask of struct device

2014-05-26 Thread Emil Goode
using platform_device_alloc() and the u64 .dma_mask of struct platform_object that it points to will be freed when the release callback function platform_device_release is called. Signed-off-by: Emil Goode --- arch/arm/mach-imx/devices/platform-ipu-core.c |5 - 1 file changed, 5 deletions

[PATCH 1/3] driver core/platform: don't leak memory allocated for dma_mask

2014-05-26 Thread Emil Goode
email-ydrone...@opteya.com https://patchwork.kernel.org/patch/3480961/ [5] http://lkml.kernel.org/r/1386886207-2735-1-git-send-email-ydrone...@opteya.com Cc: Yann Droneaud Cc: Uwe Kleine-König Cc: Dmitry Torokhov Cc: Greg Kroah-Hartman Signed-off-by: Yann Droneaud [Emil: split v4 of the patch in

Re: [PATCH] ARM: imx: introduce function imx_free_mx3_camera

2014-05-24 Thread Emil Goode
o any one of the resulting two patches. Perhaps keeping this information in the changelog is a good reason for applying the patch as it is? (I have attached the patch in question) Best regards, Emil Goode >From 66b72cb8eb71974903dd40ed67a34412faf818f0 Mon Sep 17 00:00:00 2001 From: Yann Droneaud

Re: [PATCH] ARM: imx: introduce function imx_free_mx3_camera

2014-05-22 Thread Emil Goode
Hello Uwe, On Thu, May 22, 2014 at 08:10:24PM +0200, Uwe Kleine-König wrote: > Hello Emil, > > On Thu, May 22, 2014 at 07:51:19PM +0200, Emil Goode wrote: > > We forgot to free pdev->dev.dma_mask on error after > > having called the imx_alloc_mx3_camera function. >

[PATCH] ARM: imx: introduce function imx_free_mx3_camera

2014-05-22 Thread Emil Goode
We forgot to free pdev->dev.dma_mask on error after having called the imx_alloc_mx3_camera function. This patch introduces the imx_free_mx3_camera function that adds the missing kfree call and is practical for future usage with imx_alloc_mx3_camera(). Signed-off-by: Emil Goode --- arch/arm/m

Re: [PATCH] ARM: imx: add missing kfree call in error paths

2014-05-22 Thread Emil Goode
Hello Dan, On Thu, May 22, 2014 at 04:50:16PM +0300, Dan Carpenter wrote: > On Thu, May 22, 2014 at 03:14:42PM +0200, Emil Goode wrote: > > We forgot to free pdev->dev.dma_mask as it is not freed > > by platform_device_put(). > > > > Every function which calls imx

[PATCH] ARM: imx: add missing kfree call in error paths

2014-05-22 Thread Emil Goode
We forgot to free pdev->dev.dma_mask as it is not freed by platform_device_put(). Signed-off-by: Emil Goode --- arch/arm/mach-imx/mach-mx31_3ds.c|4 +++- arch/arm/mach-imx/mach-mx31moboard.c |4 +++- arch/arm/mach-imx/mach-mx35_3ds.c|4 +++- arch/arm/mach-imx/mach-pcm03

Re: [PATCH 2/2] ARM: imx: convert camera init to use platform_device_register_full()

2014-05-22 Thread Emil Goode
Hello Uwe, On Mon, May 19, 2014 at 08:27:22AM +0200, Uwe Kleine-König wrote: > Hello Emil, > > thanks for your effort. > > On Sun, May 18, 2014 at 10:51:00PM +0200, Emil Goode wrote: > > This converts the imx camera allocation and initialization

Re: [PATCH 2/2] ARM: imx: convert camera init to use platform_device_register_full()

2014-05-20 Thread Emil Goode
Hello Uwe, Thank you for the review and sorry for the late response. On Mon, May 19, 2014 at 08:27:22AM +0200, Uwe Kleine-König wrote: > Hello Emil, > > thanks for your effort. > > On Sun, May 18, 2014 at 10:51:00PM +0200, Emil Goode wrote: > > This converts the imx

[PATCH 0/2] ARM: imx: bug fix and convertion to platform_device_register_full()

2014-05-18 Thread Emil Goode
backporting and git history. Emil Goode (2): ARM: imx: fix error handling in ipu device registration ARM: imx: convert camera init to use platform_device_register_full() arch/arm/mach-imx/devices/platform-ipu-core.c | 43 + arch/arm/mach-imx/mach-mx31_3ds.c

[PATCH 2/2] ARM: imx: convert camera init to use platform_device_register_full()

2014-05-18 Thread Emil Goode
This converts the imx camera allocation and initialization functions to use platform_device_register_full() thus simplifying the code. Signed-off-by: Emil Goode --- Only build tested, unfortunately I currently don't have the hardware. arch/arm/mach-imx/devices/platform-ipu-core.c |

[PATCH 1/2 v4] ARM: imx: fix error handling in ipu device registration

2014-05-18 Thread Emil Goode
If we fail to allocate struct platform_device pdev we dereference it after the goto label err. This bug was found using coccinelle. Signed-off-by: Emil Goode --- v4: Simplified version that just fixes the bug. Also updated the changelog. v3: Made subject line more specific. v2: Changed to

Re: [PATCH v2] ARM: imx: fix error handling

2014-05-18 Thread Emil Goode
() dma_declare_coherent_memory() platform_device_add() Sorry about the mistake! Best regards, Emil Goode -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Pleas

Re: [PATCH v2] ARM: imx: fix error handling

2014-05-18 Thread Emil Goode
Hello Uwe, On Sat, May 17, 2014 at 09:05:46PM +0200, Uwe Kleine-König wrote: > Hello Emil, > > On Sat, May 17, 2014 at 05:35:40PM +0200, Emil Goode wrote: > > On Fri, May 16, 2014 at 09:31:39PM +0200, Uwe Kleine-König wrote: > > > On Fri, May 16, 2014 at 01:49:10PM +

Re: [PATCH v3] ARM: imx: fix error handling in ipu device registration

2014-05-17 Thread Emil Goode
2 out of 4. kfree(NULL) is perfectly legal. I believe pdev could potentially be NULL, so it's the dereference that is the problem. Best regards, Emil Goode -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kern

Re: [PATCH v3] ARM: imx: fix error handling in ipu device registration

2014-05-17 Thread Emil Goode
hat it's not very pretty. Now that Uwe solved the issue regarding converting the function to platform_device_register_full(), I will look into sending a second patch that would remove these lines. Thank you! Best regards, Emil Goode -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [PATCH v3] ARM: imx: fix error handling in ipu device registration

2014-05-17 Thread Emil Goode
Hello Uwe, I was to quick to resend the patch, sorry. On Sat, May 17, 2014 at 09:18:21PM +0200, Uwe Kleine-König wrote: > Hello Emil, > > On Sat, May 17, 2014 at 08:40:33PM +0200, Emil Goode wrote: > > If we fail to allocate struct platform_device pdev we > > dereference it

Re: [PATCH v2] ARM: imx: fix error handling

2014-05-17 Thread Emil Goode
Hello Uwe, On Sat, May 17, 2014 at 09:05:46PM +0200, Uwe Kleine-König wrote: > Hello Emil, > > On Sat, May 17, 2014 at 05:35:40PM +0200, Emil Goode wrote: > > On Fri, May 16, 2014 at 09:31:39PM +0200, Uwe Kleine-König wrote: > > > On Fri, May 16, 2014 at 01:49:10PM +

[PATCH v3] ARM: imx: fix error handling in ipu device registration

2014-05-17 Thread Emil Goode
If we fail to allocate struct platform_device pdev we dereference it after the goto label err. I have rearranged the error handling a bit to fix the issue and also make it more clear. Signed-off-by: Emil Goode --- v3: Made subject line more specific. v2: Changed to return -ENOMEM instead of ret

Re: [PATCH v2] ARM: imx: fix error handling

2014-05-17 Thread Emil Goode
Hello Uwe, On Fri, May 16, 2014 at 09:31:39PM +0200, Uwe Kleine-König wrote: > Hello Walter, > > On Fri, May 16, 2014 at 01:49:10PM +0200, walter harms wrote: > > Am 16.05.2014 13:16, schrieb Emil Goode: > > > Hello Walter, > > > > > > On Fri, May

Re: [PATCH v2] ARM: imx: fix error handling

2014-05-16 Thread Emil Goode
gt; > On Fri, May 16, 2014 at 11:54:05AM +0200, Emil Goode wrote: > > If we fail to allocate struct platform_device pdev we > > dereference it after the goto label err. > > > > I have rearranged the error handling a bit to fix the issue > > and also mak

Re: [PATCH v2] ARM: imx: fix error handling

2014-05-16 Thread Emil Goode
ause obviously it's going > to be buggy like a swamp picnic. Thank you for the colorful reply, I guess there is no need for me to further defend my choice of labels :) Best regards, Emil Goode -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [PATCH v2] ARM: imx: fix error handling

2014-05-16 Thread Emil Goode
Hello Walter, On Fri, May 16, 2014 at 12:40:19PM +0200, walter harms wrote: > > > Am 16.05.2014 11:54, schrieb Emil Goode: > > If we fail to allocate struct platform_device pdev we > > dereference it after the goto label err. > > > > I have rearranged the erro

[PATCH v2] ARM: imx: fix error handling

2014-05-16 Thread Emil Goode
If we fail to allocate struct platform_device pdev we dereference it after the goto label err. I have rearranged the error handling a bit to fix the issue and also make it more clear. Signed-off-by: Emil Goode --- v2: Changed to return -ENOMEM instead of ret where possible and updated the

Re: [PATCH] ARM: imx: clean up error handling

2014-05-15 Thread Emil Goode
Hello Dan, Thanks for the review and sorry for the late reply. On Thu, May 15, 2014 at 11:32:13PM +0300, Dan Carpenter wrote: > On Thu, May 15, 2014 at 09:24:30PM +0200, Emil Goode wrote: > > If we fail to allocate struct platform_device pdev we > > dereference it after the

[PATCH] ARM: imx: clean up error handling

2014-05-15 Thread Emil Goode
If we fail to allocate struct platform_device pdev we dereference it after the goto label err. I have rearranged the error handling a bit to fix the issue and also make it more clear. Signed-off-by: Emil Goode --- arch/arm/mach-imx/devices/platform-ipu-core.c | 22 +- 1

[PATCH] ax88179_178a: don't send commands to detached device

2014-05-14 Thread Emil Goode
:1.0 (unregistered net_device): Failed to write reg index 0x0001: -19 Signed-off-by: Emil Goode --- drivers/net/usb/ax88179_178a.c |6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/usb/ax88179_178a.c b/drivers/net/usb/ax88179_178a.c index 054e59c..fe20ca8 100644

[PATCH] net: cassini: use nested lock annotation

2014-05-08 Thread Emil Goode
In the cas_lock_tx function we acquire multiple locks in a loop and need to use nested lock annotation to prevent lockdep warnings. Reported-by: Meelis Roos Signed-off-by: Emil Goode --- drivers/net/ethernet/sun/cassini.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a

[PATCH] staging: lustre: remove unused variables

2014-05-06 Thread Emil Goode
The following commit left some unused variables behind. commit 80db2734acbc78db12798cfb611d6acc7fe389e6 Author: Fredrick John Berchmans Date: Fri May 2 19:50:15 2014 -0700 staging: lustre use kernel socket sockopt apis Signed-off-by: Emil Goode --- drivers/staging/lustre/lustre/libcfs

[PATCH 1/2] brcmsmac: fix deadlock on missing firmware

2014-03-09 Thread Emil Goode
in .start() callback") This patch fixes the bug by removing the call to brcms_remove() and moves the brcms_request_fw() call to the top of the .start callback to not initiate anything unless firmware is installed. Signed-off-by: Emil Goode --- drivers/net/wireless/brcm80211/brcm

[PATCH 2/2] brcmsmac: update comment to reflect the code

2014-03-09 Thread Emil Goode
The brcms_attach function is defined as static but the comment is saying that it should not be static or gcc will issue a warning. I believe we can remove the comment as I don't se a problem with this function being defined as static. Signed-off-by: Emil Goode --- drivers/net/wireless/brcm

[PATCH Resend] net: asix: add missing flag to struct driver_info

2014-02-13 Thread Emil Goode
econd time from within the rx_process function in the usbnet module. Signed-off-by: Emil Goode Reported-by: Bjørn Mork --- drivers/net/usb/asix_devices.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/usb/asix_devices.c b/drivers/net/usb/asix_devices.c index 97

Re: [PATCH v2] usbnet: remove generic hard_header_len check

2014-02-13 Thread Emil Goode
On Thu, Feb 13, 2014 at 04:56:58PM +, David Laight wrote: > From: Of Emil Goode > > This patch removes a generic hard_header_len check from the usbnet > > module that is causing dropped packages under certain circumstances > > for devices that send rx packets that

[PATCH v2] usbnet: remove generic hard_header_len check

2014-02-13 Thread Emil Goode
one list to queue skbs for cleanup. The changes place full responsibility on the rx_fixup callback functions that clone skbs to only pass valid skbs to the usbnet_skb_return function. Signed-off-by: Emil Goode Reported-by: Igor Gnatenko --- v2: Added a comment in the changelog about the removal o

Re: [PATCH] usbnet: remove generic hard_header_len check

2014-02-13 Thread Emil Goode
On Thu, Feb 13, 2014 at 10:05:39AM +0100, Bjørn Mork wrote: > Emil Goode writes: > > > This patch removes a generic hard_header_len check from the usbnet > > module that is causing dropped packages under certain circumstances > > for devices that send rx packets t

[PATCH] usbnet: remove generic hard_header_len check

2014-02-12 Thread Emil Goode
that clone skbs to only pass valid skbs to the usbnet_skb_return function. Signed-off-by: Emil Goode Reported-by: Igor Gnatenko --- An alternative solution is to add the ETH_HLEN check to usbnet_skb_return() and add short skbs to the skb->done list to be cleaned up in rx_process(). drivers/

Re: [PATCH 1/2 v2] usbnet: fix bad header length bug

2014-02-10 Thread Emil Goode
On Mon, Feb 10, 2014 at 02:05:20PM +0100, Bjørn Mork wrote: > Oliver Neukum writes: > > On Mon, 2014-02-10 at 13:00 +0100, Emil Goode wrote: > >> On Mon, Feb 10, 2014 at 07:40:58AM +0100, Oliver Neukum wrote: > > > >> > Well, then how about simply removin

Re: [PATCH 1/2 v2] usbnet: fix bad header length bug

2014-02-10 Thread Emil Goode
On Mon, Feb 10, 2014 at 07:40:58AM +0100, Oliver Neukum wrote: > On Mon, 2014-02-10 at 00:06 +0100, Emil Goode wrote: > > The AX88772B occasionally send rx packets that cross urb boundaries > > and the remaining partial packet is sent with no hardware header. > > When the

[PATCH 1/2 v2] usbnet: fix bad header length bug

2014-02-09 Thread Emil Goode
discarding small skbs, which I believe has caused some confusion. Signed-off-by: Emil Goode Reported-by: Igor Gnatenko --- v2: This patch solves the bug by introducing a new flag instead of setting hard_header_len to 0. I realize that there are already a lot of flags but hard_header_len is

[PATCH 2/2] net: asix: add missing flag to struct driver_info

2014-02-09 Thread Emil Goode
econd time from within the rx_process function in the usbnet module. Signed-off-by: Emil Goode Reported-by: Bjørn Mork --- drivers/net/usb/asix_devices.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/usb/asix_devices.c b/drivers/net/usb/asix_devices.c index 7c

Re: [PATCH] net: asix: fix bad header length bug

2014-02-07 Thread Emil Goode
On Fri, Feb 07, 2014 at 10:38:04AM +0100, Bjørn Mork wrote: > Emil Goode writes: > > On Thu, Feb 06, 2014 at 03:28:13PM +, David Laight wrote: > >> From: Igor Gnatenko > >> > On Thu, 2014-02-06 at 13:56 +0100, Emil Goode wrote: > >> > > The AX88772

Re: [PATCH] net: asix: fix bad header length bug

2014-02-06 Thread Emil Goode
On Thu, Feb 06, 2014 at 03:28:13PM +, David Laight wrote: > From: Igor Gnatenko > > On Thu, 2014-02-06 at 13:56 +0100, Emil Goode wrote: > > > The AX88772B occasionally send rx packets that cross urb boundaries > > > and the remaining partial packet is sent wit

Re: [PATCH] net: asix: fix bad header length bug

2014-02-06 Thread Emil Goode
Hello David, Thank's for the review. On Thu, Feb 06, 2014 at 01:37:12PM +, David Laight wrote: > From: Emil Goode > > The AX88772B occasionally send rx packets that cross urb boundaries > > and the remaining partial packet is sent with no header. > > When the buffe

[PATCH] net: asix: fix bad header length bug

2014-02-06 Thread Emil Goode
packages and error messages in dmesg. This can be reproduced by using ping with a packet size between 1965-1976. The bug has been reported here: https://bugzilla.kernel.org/show_bug.cgi?id=29082 Signed-off-by: Emil Goode --- drivers/net/usb/asix_devices.c |1 + 1 file changed, 1 insertion

[PATCH] ACPI: thermal: remove const from thermal_zone_device_ops declaration

2014-01-07 Thread Emil Goode
tree parser Signed-off-by: Emil Goode --- drivers/acpi/thermal.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c index 1fd21ad..8349a55 100644 --- a/drivers/acpi/thermal.c +++ b/drivers/acpi/thermal.c @@ -861,7 +861,7

[PATCH] xhci: Add missing unlocks on error paths

2013-06-19 Thread Emil Goode
This patch adds missing unlocks on error paths in the xhci_free_streams and xhci_configure_endpoint functions. Signed-off-by: Emil Goode --- drivers/usb/host/xhci.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index 6779c92..2c49f00

[PATCH] USB: EHCI: Remove double assignment of .start in ehci_msp_hc_driver

2013-06-16 Thread Emil Goode
This patch removes a double assignment of .start in struct hc_driver ehci_msp_hc_driver and also makes the code look more tidy. Signed-off-by: Emil Goode --- drivers/usb/host/ehci-pmcmsp.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/usb/host/ehci-pmcmsp.c b

[PATCH] ASoC: Fix double assignment of .owner in struct snd_soc_card

2013-06-14 Thread Emil Goode
In struct snd_soc_card zylonite .owner is assigned THIS_MODULE twice, remove one of them. Signed-off-by: Emil Goode --- sound/soc/pxa/zylonite.c |1 - 1 file changed, 1 deletion(-) diff --git a/sound/soc/pxa/zylonite.c b/sound/soc/pxa/zylonite.c index ceb6566..db8aadf 100644 --- a/sound

Re: [PATCH] staging: tidspbridge: Fix potential NULL pointer dereference

2013-06-12 Thread Emil Goode
Thank you Dan! That's right, It's of course not NULL after freed. Yes the code looks strange here, I'm not sure what was intended. Best regards, Emil On Wed, Jun 12, 2013 at 08:08:17AM -0700, Dan Carpenter wrote: > 1) This patch doesn't do anything. "dcd_key" points to freed memory > but it's n

[PATCH] staging: tidspbridge: Fix potential NULL pointer dereference

2013-06-12 Thread Emil Goode
We free dcd_key on line 897 and then dereference it a few lines below. This patch adds a NULL check to make sure we can use dcd_key. Signed-off-by: Emil Goode --- drivers/staging/tidspbridge/rmgr/dbdcd.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging

Re: [PATCH v2] mtd: orion_nand: Improve error handling in orion_nand_probe

2013-06-10 Thread Emil Goode
t; Monday, June 10, 2013 9:01 AM, Emil Goode wrote: > > > > This patch fixes some issues in the error handling and simplifies > > the code by converting to devm* functions. > > > > If the kzalloc call fails it is unnecessary to use the label no_res > > and pass a

[PATCH v2] mtd: orion_nand: Improve error handling in orion_nand_probe

2013-06-09 Thread Emil Goode
remove the NULL check after the platform_get_resource call. Signed-off-by: Emil Goode --- This patch is only build tested v2: Fix change log typo and remove error messages for kzalloc calls drivers/mtd/nand/orion_nand.c | 49 + 1 file changed, 15 insertions

Re: [PATCH] mtd: orion_nand: Improve error handling in orion_nand_probe

2013-06-09 Thread Emil Goode
Hello, Sorry for not responding earlier, I was away from my computer. Thanks for the review, I will send a second version that applies on top of Andy's patch and fix that typo in the change log. Best regards, Emil On Mon, Jun 10, 2013 at 12:15:22AM +0300, Andy Shevchenko wrote: > On Sun, Jun 9,

[PATCH] mtd: orion_nand: Improve error handling in orion_nand_probe

2013-06-09 Thread Emil Goode
remove the NULL check after the platform_get_resource call. Signed-off-by: Emil Goode --- The patch is only build tested drivers/mtd/nand/orion_nand.c | 39 +++ 1 file changed, 11 insertions(+), 28 deletions(-) diff --git a/drivers/mtd/nand/orion_nand.c b

[PATCH] uio: uio_pruss: Fix potential NULL pointer dereference

2013-06-06 Thread Emil Goode
In function pruss_probe we free gdev and try to use it on the next line. I have moved the dereference to above the kfree of gdev. Signed-off-by: Emil Goode --- drivers/uio/uio_pruss.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/uio/uio_pruss.c b/drivers/uio

[PATCH] OMAPDSS: Remove kfree for memory allocated with devm_kzalloc

2013-06-05 Thread Emil Goode
It's not necessary to free memory allocated with devm_kzalloc in a remove function and using kfree leads to a double free. Signed-off-by: Emil Goode --- drivers/video/omap2/displays/panel-picodlp.c |2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/video/omap2/displays/

Re: [PATCH] net: ipv6: Fix incompatible pointer type warning

2013-06-05 Thread Emil Goode
Hello David, I'm sorry, the patch applies to the linux-next tree. In the future I will be very careful about sending patches that fix problems related to the merging of different trees. Best regards, Emil Goode On Tue, Jun 04, 2013 at 05:14:56PM -0700, David Miller wrote: > From: Em

[PATCH] net: ipv6: Fix incompatible pointer type warning

2013-06-03 Thread Emil Goode
support to the ping socket.") Sparse output: net/ipv6/ping.c: In function ‘pingv6_init’: net/ipv6/ping.c:87:27: warning: assignment from incompatible pointer type [enabled by default] Signed-off-by: Emil Goode --- include/net/ping.h |2 +- net/ipv6/ping.c|2 +- 2 files c

Re: [PATCH] usb: musb: use the new %pa format specifier for dma_addr_t

2013-06-02 Thread Emil Goode
Maybe wait and see if %pa gets more usage and if the discussion comes up again. Best regards, Emil On Sat, Jun 01, 2013 at 04:22:18PM -0700, Joe Perches wrote: > On Sun, 2013-06-02 at 01:06 +0200, Emil Goode wrote: > > Maybe there should be another format specifier %da an

Re: [PATCH] usb: musb: use the new %pa format specifier for dma_addr_t

2013-06-01 Thread Emil Goode
Hello Joe and Randy, Maybe there should be another format specifier %da and Randy's clarifying comment can be added there to the documentation? Best regards, Emil Goode On Sat, Jun 01, 2013 at 03:16:00PM -0700, Joe Perches wrote: > On Sat, 2013-06-01 at 14:56 -0700, Randy Dunl

[PATCH v2] usb: musb: use the new %pa format specifier for dma_addr_t

2013-06-01 Thread Emil Goode
w lines below. I have moved this code up and pass the variable buf to dev_dbg. Signed-off-by: Emil Goode --- v2: Remove 0x from string as it will print as 0x0x This applies on top of commit 43d5ad743c6f ("usb: musb: host: fix build warning") I also added braces to the else statement for

Re: [PATCH] usb: musb: use the new %pa format specifier for dma_addr_t

2013-06-01 Thread Emil Goode
I see, will send a second version. Thank's Emil On Sat, Jun 01, 2013 at 11:29:10AM -0700, Joe Perches wrote: > On Sat, 2013-06-01 at 20:02 +0200, Emil Goode wrote: > > This patch makes use of the new format specifier %pa that was introduced > > by

[PATCH] usb: musb: use the new %pa format specifier for dma_addr_t

2013-06-01 Thread Emil Goode
w lines below. I have moved this code up and pass the variable buf to dev_dbg. Signed-off-by: Emil Goode --- I also added braces to the else statement for consistency. (Didn't want to send a separate patch for that) drivers/usb/musb/musb_host.c | 12 +--- 1 file changed, 5 inser

Re: [PATCH] usb: musb: Fix format specifier warning

2013-06-01 Thread Emil Goode
Hello, Thank's for your pointers. I will send a patch that applies on top of Felipe's patch. Best regards, Emil Goode On Sat, Jun 01, 2013 at 04:15:03PM +0300, Andy Shevchenko wrote: > On Sat, Jun 1, 2013 at 1:39 AM, Randy Dunlap wrote: > > On 05/31/13 15:34, Andy Shevch

  1   2   >