Skip to content

Commit d159893

Browse files
authored
Merge pull request #320 from xhorn-pan/bh-thread-rmmod-panic-fix
Fix kernel panic when unload bh_threaded module
2 parents 989e994 + d30d811 commit d159893

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

examples/bh_threaded.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ static int __init bottomhalf_init(void)
156156
/* cleanup what has been setup so far */
157157
#ifdef NO_GPIO_REQUEST_ARRAY
158158
fail4:
159-
free_irq(button_irqs[0], NULL);
159+
free_irq(button_irqs[0], &buttons[0]);
160160

161161
fail3:
162162
gpio_free(buttons[1].gpio);
@@ -168,7 +168,7 @@ static int __init bottomhalf_init(void)
168168
gpio_free(leds[0].gpio);
169169
#else
170170
fail3:
171-
free_irq(button_irqs[0], NULL);
171+
free_irq(button_irqs[0], &buttons[0]);
172172

173173
fail2:
174174
gpio_free_array(buttons, ARRAY_SIZE(leds));
@@ -185,8 +185,8 @@ static void __exit bottomhalf_exit(void)
185185
pr_info("%s\n", __func__);
186186

187187
/* free irqs */
188-
free_irq(button_irqs[0], NULL);
189-
free_irq(button_irqs[1], NULL);
188+
free_irq(button_irqs[0], &buttons[0]);
189+
free_irq(button_irqs[1], &buttons[1]);
190190

191191
/* turn all LEDs off */
192192
#ifdef NO_GPIO_REQUEST_ARRAY

0 commit comments

Comments
 (0)