lantiq: fix an endless loop in the vmmc platform code

this was caused by not honoured error return codes of of_gpio_count()

Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 38878
v19.07.3_mercusys_ac12_duma
John Crispin 11 years ago
parent 2bc70cfbac
commit 06ada4b10f

@ -54,7 +54,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
+ (void*)CPHYSADDR(dma_alloc_coherent(NULL, CP1_SIZE, &dma, GFP_ATOMIC));
+
+ gpio_count = of_gpio_count(pdev->dev.of_node);
+ while (gpio_count) {
+ while (gpio_count > 0) {
+ enum of_gpio_flags flags;
+ int gpio = of_get_gpio_flags(pdev->dev.of_node, --gpio_count, &flags);
+ if (gpio_request(gpio, "vmmc-relay"))

Loading…
Cancel
Save