All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] mmc: wmt-sdmmc: Prevent NULL dereference for of_id->data
@ 2013-10-09  1:36 Axel Lin
  2013-10-09  1:38 ` [PATCH 2/2] mmc: wmt-sdmmc: Remove deprecated IRQF_DISABLED Axel Lin
  0 siblings, 1 reply; 2+ messages in thread
From: Axel Lin @ 2013-10-09  1:36 UTC (permalink / raw)
  To: Chris Ball; +Cc: Tony Prisk, linux-mmc

Ensure having NULL checking for of_id before dereference of_id->data.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
 drivers/mmc/host/wmt-sdmmc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/mmc/host/wmt-sdmmc.c b/drivers/mmc/host/wmt-sdmmc.c
index 57858ef..5501c9f 100644
--- a/drivers/mmc/host/wmt-sdmmc.c
+++ b/drivers/mmc/host/wmt-sdmmc.c
@@ -757,7 +757,7 @@ static int wmt_mci_probe(struct platform_device *pdev)
 	struct device_node *np = pdev->dev.of_node;
 	const struct of_device_id *of_id =
 		of_match_device(wmt_mci_dt_ids, &pdev->dev);
-	const struct wmt_mci_caps *wmt_caps = of_id->data;
+	const struct wmt_mci_caps *wmt_caps;
 	int ret;
 	int regular_irq, dma_irq;
 
@@ -771,6 +771,7 @@ static int wmt_mci_probe(struct platform_device *pdev)
 		return -EFAULT;
 	}
 
+	wmt_caps = of_id->data;
 	regular_irq = irq_of_parse_and_map(np, 0);
 	dma_irq = irq_of_parse_and_map(np, 1);
 
-- 
1.8.1.2




^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH 2/2] mmc: wmt-sdmmc: Remove deprecated IRQF_DISABLED
  2013-10-09  1:36 [PATCH 1/2] mmc: wmt-sdmmc: Prevent NULL dereference for of_id->data Axel Lin
@ 2013-10-09  1:38 ` Axel Lin
  0 siblings, 0 replies; 2+ messages in thread
From: Axel Lin @ 2013-10-09  1:38 UTC (permalink / raw)
  To: Chris Ball; +Cc: Tony Prisk, linux-mmc

It's a NOOP since 2.6.35 and it will be removed one day.
This is not trivial because current code uses hard coded 32 instead of
IRQF_DISABLED in the request_irq call.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
 drivers/mmc/host/wmt-sdmmc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/host/wmt-sdmmc.c b/drivers/mmc/host/wmt-sdmmc.c
index 5501c9f..8a48a50 100644
--- a/drivers/mmc/host/wmt-sdmmc.c
+++ b/drivers/mmc/host/wmt-sdmmc.c
@@ -829,7 +829,7 @@ static int wmt_mci_probe(struct platform_device *pdev)
 		goto fail3;
 	}
 
-	ret = request_irq(dma_irq, wmt_mci_dma_isr, 32, "sdmmc", priv);
+	ret = request_irq(dma_irq, wmt_mci_dma_isr, 0, "sdmmc", priv);
 	if (ret) {
 		dev_err(&pdev->dev, "Register DMA IRQ fail\n");
 		goto fail4;
-- 
1.8.1.2




^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-10-09  1:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-09  1:36 [PATCH 1/2] mmc: wmt-sdmmc: Prevent NULL dereference for of_id->data Axel Lin
2013-10-09  1:38 ` [PATCH 2/2] mmc: wmt-sdmmc: Remove deprecated IRQF_DISABLED Axel Lin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.