Sorry for the delay, I have had a lot of distractions.
The trouble is that the handling of bt_bmc->irq needs to be consistent.
Either it needs to be negative if the irq allocation fails, or it needs
to be zero if the irq allocation fails. I think it needs to be negative
because zero is a valid interrupt in some cases.
Consider the following code:
bt_bmc_config_irq(bt_bmc, pdev);
if (bt_bmc->irq) {
dev_info(dev, "Using IRQ %d\n", bt_bmc->irq);
} else {
dev_info(dev, "No IRQ; using timer\n");
timer_setup(&bt_bmc->poll_timer, poll_timer, 0);
If bt_bmc->irq is negative (if platform_get_irq_optional() fails), it
will say it's using the irq and won't start a timer and the driver won't
work. Then later (in your change below) it will try to stop the timer
even though it's not running.
If devm_request_irq() fails, then the interrupt is not set, but since
bt_bmc->irq is most likely not zero, it will not start the timer and the
driver won't work.
You really need to set bt_bmc->irq negative if it fails. And fix the
check above to be if (bt_bmc->irq >= 0).