usb: misc: eud: Add IRQ check for platform_get_irq()
The function eud_probe() should check the return value of platform_get_irq() for errors so as to not pass a negative value to the devm_request_threaded_irq(). Signed-off-by: Chen Ni <nichen@iscas.ac.cn> Reviewed-by: Caleb Connolly <caleb.connolly@linaro.org> Link: https://lore.kernel.org/r/20231102075113.1043358-1-nichen@iscas.ac.cn Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
d990e22774
commit
6437760acc
@@ -205,6 +205,9 @@ static int eud_probe(struct platform_device *pdev)
|
||||
return PTR_ERR(chip->mode_mgr);
|
||||
|
||||
chip->irq = platform_get_irq(pdev, 0);
|
||||
if (chip->irq < 0)
|
||||
return chip->irq;
|
||||
|
||||
ret = devm_request_threaded_irq(&pdev->dev, chip->irq, handle_eud_irq,
|
||||
handle_eud_irq_thread, IRQF_ONESHOT, NULL, chip);
|
||||
if (ret)
|
||||
|
||||
Reference in New Issue
Block a user