Skip to content

Commit b32f2a8

Browse files
committed
staging: wilc1000: avoid request_irq() if interrupt is invalid
Do not request irq if the irq number wasn't passed from device tree or it was wrongly passed. Fixes: 57041706005ea ("staging: wilc1000: copy driver from github") Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
1 parent a8d1a32 commit b32f2a8

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

drivers/staging/wilc1000/netdev.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,8 @@ static int init_irq(struct net_device *dev)
182182
return -EINVAL;
183183
}
184184
} else {
185-
if (request_irq(wl->dev_irq_num, host_wakeup_isr,
185+
if (wl->dev_irq_num &&
186+
request_irq(wl->dev_irq_num, host_wakeup_isr,
186187
IRQF_TRIGGER_FALLING |
187188
IRQF_NO_SUSPEND,
188189
"WILC_IRQ", wl) < 0) {

0 commit comments

Comments
 (0)