diff options
Diffstat (limited to 'drivers/rtc')
-rw-r--r-- | drivers/rtc/rtc-hym8563.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/drivers/rtc/rtc-hym8563.c b/drivers/rtc/rtc-hym8563.c index 0f710e98538f..e9da7959d3fe 100644 --- a/drivers/rtc/rtc-hym8563.c +++ b/drivers/rtc/rtc-hym8563.c @@ -548,14 +548,16 @@ static int hym8563_probe(struct i2c_client *client, return ret; } - ret = devm_request_threaded_irq(&client->dev, client->irq, - NULL, hym8563_irq, - IRQF_TRIGGER_LOW | IRQF_ONESHOT, - client->name, hym8563); - if (ret < 0) { - dev_err(&client->dev, "irq %d request failed, %d\n", - client->irq, ret); - return ret; + if (client->irq > 0) { + ret = devm_request_threaded_irq(&client->dev, client->irq, + NULL, hym8563_irq, + IRQF_TRIGGER_LOW | IRQF_ONESHOT, + client->name, hym8563); + if (ret < 0) { + dev_err(&client->dev, "irq %d request failed, %d\n", + client->irq, ret); + return ret; + } } /* check state of calendar information */ |