kernel/drivers/gpio/gpio-tb10x.c
.. .. @@ -195,7 +195,7 @@ 195 195 handle_edge_irq, IRQ_NOREQUEST, IRQ_NOPROBE, 196 196 IRQ_GC_INIT_MASK_CACHE); 197 197 if (ret) 198 - return ret;198 + goto err_remove_domain;199 199 200 200 gc = tb10x_gpio->domain->gc->gc[0]; 201 201 gc->reg_base = tb10x_gpio->base; .. .. @@ -209,6 +209,10 @@ 209 209 } 210 210 211 211 return 0; 212 +213 +err_remove_domain:214 + irq_domain_remove(tb10x_gpio->domain);215 + return ret;212 216 } 213 217 214 218 static int tb10x_gpio_remove(struct platform_device *pdev)