提交 d95dc9e3 编写于 作者: D Dmitry Torokhov 提交者: Sebastian Reichel

HSI: nokia-modem: fix error handling of irq_of_parse_and_map

Return value of irq_of_parse_and_map() is unsigned int, with 0
indicating failure, so testing for negative result never works.
Signed-off-by: NDmitry Torokhov <dtor@chromium.org>
Signed-off-by: NSebastian Reichel <sre@kernel.org>
上级 cdb83947
无相关合并请求
......@@ -164,9 +164,9 @@ static int nokia_modem_probe(struct device *dev)
dev_set_drvdata(dev, modem);
irq = irq_of_parse_and_map(np, 0);
if (irq < 0) {
if (!irq) {
dev_err(dev, "Invalid rst_ind interrupt (%d)\n", irq);
return irq;
return -EINVAL;
}
modem->nokia_modem_rst_ind_irq = irq;
pflags = irq_get_trigger_type(irq);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册