mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 22:21:40 +00:00
hwmon: pwm-fan: Use platform_get_irq_optional()
The PWM fan interrupt is optional, so we don't want an error message in the kernel log if it wasn't specified. Signed-off-by: Thierry Reding <treding@nvidia.com> Reviewed-by: Stephen Boyd <swboyd@chromium.org> Acked-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Link: https://lore.kernel.org/r/20190828083411.2496-2-thierry.reding@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
8973ea4790
commit
6e7e5c7fbc
@ -304,7 +304,7 @@ static int pwm_fan_probe(struct platform_device *pdev)
|
||||
|
||||
platform_set_drvdata(pdev, ctx);
|
||||
|
||||
ctx->irq = platform_get_irq(pdev, 0);
|
||||
ctx->irq = platform_get_irq_optional(pdev, 0);
|
||||
if (ctx->irq == -EPROBE_DEFER)
|
||||
return ctx->irq;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user