From: Thierry Reding Date: Wed, 28 Aug 2019 08:34:11 +0000 (+0200) Subject: hwmon: pwm-fan: Use platform_get_irq_optional() X-Git-Tag: v5.4-rc1~137^2~4 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=6e7e5c7fbc1c84e4ac657e0cb5bf9ca24492cc8f;p=linux.git 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 Reviewed-by: Stephen Boyd Acked-by: Guenter Roeck Acked-by: Bartlomiej Zolnierkiewicz Link: https://lore.kernel.org/r/20190828083411.2496-2-thierry.reding@gmail.com Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/hwmon/pwm-fan.c b/drivers/hwmon/pwm-fan.c index 54c0ff00d67f..42ffd2e5182d 100644 --- a/drivers/hwmon/pwm-fan.c +++ b/drivers/hwmon/pwm-fan.c @@ -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;