[PATCH 1/1] mmc: sdhci-spear: Fix NULL pointer dereference

2013-09-12 Thread Sachin Kamat
pdata could be NULL if cd_gpio = -1. Hence move the NULL check outside the if condition. Signed-off-by: Sachin Kamat sachin.ka...@linaro.org Cc: Viresh Kumar viresh.ku...@linaro.org --- Only compile tested. --- drivers/mmc/host/sdhci-spear.c | 10 +- 1 file changed, 5 insertions(+), 5

[PATCH 1/3] mmc: mvsdio: Convert to devm_ioremap_resource

2013-09-12 Thread Sachin Kamat
devm_request_and_ioremap() is deprecated. Use devm_ioremap_resource() instead. Signed-off-by: Sachin Kamat sachin.ka...@linaro.org --- drivers/mmc/host/mvsdio.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/mmc/host/mvsdio.c b/drivers/mmc/host/mvsdio.c

[PATCH 2/3] mmc: dw_mmc-socfpga: Remove redundant of_match_ptr

2013-09-12 Thread Sachin Kamat
'dw_mci_socfpga_match' is always compiled in. Hence of_match_ptr is not necessary. Signed-off-by: Sachin Kamat sachin.ka...@linaro.org --- drivers/mmc/host/dw_mmc-socfpga.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/host/dw_mmc-socfpga.c

[PATCH 3/3] mmc: dw_mmc-socfpga: Staticize dw_mci_socfpga_probe

2013-09-12 Thread Sachin Kamat
'dw_mci_socfpga_probe' is used only in this file. Make it static. Signed-off-by: Sachin Kamat sachin.ka...@linaro.org --- drivers/mmc/host/dw_mmc-socfpga.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/host/dw_mmc-socfpga.c

Re: [PATCH 1/1] mmc: sdhci-spear: Fix NULL pointer dereference

2013-09-12 Thread Viresh Kumar
On 12 September 2013 12:13, Sachin Kamat sachin.ka...@linaro.org wrote: pdata could be NULL if cd_gpio = -1. Hence move the NULL check outside the if condition. Signed-off-by: Sachin Kamat sachin.ka...@linaro.org Cc: Viresh Kumar viresh.ku...@linaro.org --- Only compile tested. ---

Re: [PATCH 1/1] mmc: sdhci-spear: Fix NULL pointer dereference

2013-09-12 Thread Sachin Kamat
On 12 September 2013 13:19, Viresh Kumar viresh.ku...@linaro.org wrote: On 12 September 2013 12:13, Sachin Kamat sachin.ka...@linaro.org wrote: pdata could be NULL if cd_gpio = -1. Hence move the NULL check outside the if condition. Signed-off-by: Sachin Kamat sachin.ka...@linaro.org Cc:

Re: [PATCH 1/1] mmc: sdhci-spear: Fix NULL pointer dereference

2013-09-12 Thread Viresh Kumar
On 12 September 2013 13:41, Sachin Kamat sachin.ka...@linaro.org wrote: Yes. That was my second option. If we do that we would get something as below: 84 /* If pdata is required */ 85 if (cd_gpio != -1) { 86pdata = devm_kzalloc(pdev-dev, sizeof(*pdata),

Re: [PATCH 1/1] mmc: sdhci-spear: Fix NULL pointer dereference

2013-09-12 Thread Sachin Kamat
On 12 September 2013 13:43, Viresh Kumar viresh.ku...@linaro.org wrote: On 12 September 2013 13:41, Sachin Kamat sachin.ka...@linaro.org wrote: Yes. That was my second option. If we do that we would get something as below: 84 /* If pdata is required */ 85 if (cd_gpio !=

Re: [PATCH 1/1] mmc: sdhci-spear: Fix NULL pointer dereference

2013-09-12 Thread Viresh Kumar
On 12 September 2013 13:48, Sachin Kamat sachin.ka...@linaro.org wrote: 96 return ERR_PTR(-ENODATA); Wouldn't this be unconditional error return whether pdata is null or not? Stupid me... I meant return pdata from this place.. Necessary checks are done in sdhci_probe() -- To unsubscribe

Re: [PATCH 1/1] mmc: sdhci-spear: Fix NULL pointer dereference

2013-09-12 Thread Sachin Kamat
On 12 September 2013 13:50, Viresh Kumar viresh.ku...@linaro.org wrote: On 12 September 2013 13:48, Sachin Kamat sachin.ka...@linaro.org wrote: 96 return ERR_PTR(-ENODATA); Wouldn't this be unconditional error return whether pdata is null or not? Stupid me... I meant return pdata from

[PATCH 1/1] mmc: ushc: Fix incorrect parameter in sizeof

2013-09-12 Thread Sachin Kamat
sizeof should be of the parent structure type. Signed-off-by: Sachin Kamat sachin.ka...@linaro.org Cc: David Vrabel david.vra...@csr.com --- Compile tested. --- drivers/mmc/host/ushc.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/host/ushc.c

[PATCH 1/1] mmc: wmt-sdmmc: Fix NULL pointer dereference

2013-09-12 Thread Sachin Kamat
'of_id' is dereferenced before NULL pointer check. Move it to after the check. Signed-off-by: Sachin Kamat sachin.ka...@linaro.org --- Compile tested. --- drivers/mmc/host/wmt-sdmmc.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/wmt-sdmmc.c

Re: [PATCH 1/1] mmc: sdhci-spear: Fix NULL pointer dereference

2013-09-12 Thread Viresh Kumar
On 12 September 2013 13:52, Sachin Kamat sachin.ka...@linaro.org wrote: sdhci_probe only checks for IS_ERR. We would need to change it to IS_ERR_OR_NULL (which I do not prefer personally as there is some discussion for its removal). In that case we would need to return as I mentioned in my

Re: [PATCH 1/1] mmc: sdhci-spear: Fix NULL pointer dereference

2013-09-12 Thread Sachin Kamat
On 12 September 2013 14:26, Viresh Kumar viresh.ku...@linaro.org wrote: On 12 September 2013 13:52, Sachin Kamat sachin.ka...@linaro.org wrote: sdhci_probe only checks for IS_ERR. We would need to change it to IS_ERR_OR_NULL (which I do not prefer personally as there is some discussion for its

[PATCH v2 1/1] mmc: sdhci-spear: Fix NULL pointer dereference

2013-09-12 Thread Sachin Kamat
pdata could be NULL if cd_gpio = -1. Dereference pdata only if it is not NULL. Signed-off-by: Sachin Kamat sachin.ka...@linaro.org Cc: Viresh Kumar viresh.ku...@linaro.org --- Compile tested. Changes since v1: * Moved the pdata assignment inside if condition. --- drivers/mmc/host/sdhci-spear.c |

Re: [PATCH v2 1/1] mmc: sdhci-spear: Fix NULL pointer dereference

2013-09-12 Thread Viresh Kumar
On 12 September 2013 14:34, Sachin Kamat sachin.ka...@linaro.org wrote: pdata could be NULL if cd_gpio = -1. Dereference pdata only if it is not NULL. Signed-off-by: Sachin Kamat sachin.ka...@linaro.org Cc: Viresh Kumar viresh.ku...@linaro.org --- Compile tested. Changes since v1: * Moved

Re: [PATCH v3] ARM: EDMA: Fix clearing of unused list for DT DMA resources

2013-09-12 Thread Sekhar Nori
On Wednesday 11 September 2013 12:22 AM, Joel Fernandes wrote: HWMOD removal for MMC is breaking edma_start as the events are being manually triggered due to unused channel list not being clear. This patch fixes the issue, by reading the dmas property from the DT node if it exists and

Uninitialized rx_req/tx_req (was: Re: [PATCH v2 2/3] mmc: omap_hsmmc: Skip platform_get_resource_byname() for dt case)

2013-09-12 Thread Geert Uytterhoeven
On Tue, Mar 5, 2013 at 10:13 PM, Matt Porter mpor...@ti.com wrote: From: Santosh Shilimkar santosh.shilim...@ti.com MMC driver probe will abort for DT case because of failed platform_get_resource_byname() lookup. Fix it by skipping resource byname lookup for device tree build. Issue is

Re: Uninitialized rx_req/tx_req (was: Re: [PATCH v2 2/3] mmc: omap_hsmmc: Skip platform_get_resource_byname() for dt case)

2013-09-12 Thread Balaji T K
On Thursday 12 September 2013 06:11 PM, Geert Uytterhoeven wrote: On Tue, Mar 5, 2013 at 10:13 PM, Matt Porter mpor...@ti.com wrote: From: Santosh Shilimkar santosh.shilim...@ti.com MMC driver probe will abort for DT case because of failed platform_get_resource_byname() lookup. Fix it by

Re: Uninitialized rx_req/tx_req (was: Re: [PATCH v2 2/3] mmc: omap_hsmmc: Skip platform_get_resource_byname() for dt case)

2013-09-12 Thread Balaji T K
On Thursday 12 September 2013 06:11 PM, Geert Uytterhoeven wrote: On Tue, Mar 5, 2013 at 10:13 PM, Matt Porter mpor...@ti.com wrote: From: Santosh Shilimkar santosh.shilim...@ti.com MMC driver probe will abort for DT case because of failed platform_get_resource_byname() lookup. Fix it by

[PATCH v4] mmc: sdhci-msm: Add support for MSM chipsets

2013-09-12 Thread Georgi Djakov
This platform driver adds the support of Secure Digital Host Controller Interface compliant controller found in Qualcomm MSM chipsets. CC: Asutosh Das asuto...@codeaurora.org CC: Venkat Gopalakrishnan venk...@codeaurora.org CC: Sahitya Tummala stumm...@codeaurora.org CC: Subhash Jadavani

Re: [PATCH 1/1] mmc: wmt-sdmmc: Fix NULL pointer dereference

2013-09-12 Thread Tony Prisk
On 12/09/13 20:21, Sachin Kamat wrote: 'of_id' is dereferenced before NULL pointer check. Move it to after the check. Signed-off-by: Sachin Kamat sachin.ka...@linaro.org --- Compile tested. --- drivers/mmc/host/wmt-sdmmc.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff