From: sashiko-bot@kernel.org
To: "Robert Marko" <robert.marko@sartura.hr>,
linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org
Cc: robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v3 3/4] hwmon: Add Microchip LAN969x fan controller driver
Date: Wed, 11 Nov 2026 16:51:32 +0000 [thread overview]
Message-ID: <sashiko-outbox-209333@kernel.org> (raw)
In-Reply-To: <20261111161619.232141-3-robert.marko@sartura.hr>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] hwmon: lan969x-fan: separate __free() declaration in
lan969x_fan_probe()
--
commit b2df768159182a27301144a0ba71d10e45a494fd
Author: Robert Marko <robert.marko@sartura.hr>
hwmon: Add Microchip LAN969x fan controller driver
This commit adds a hwmon driver for the Microchip LAN969x fan controller,
supporting tachometer input, PWM output, and thermal cooling.
> diff --git a/drivers/hwmon/lan969x-fan.c b/drivers/hwmon/lan969x-fan.c
> new file mode 100644
> index 0000000000000..fae0248658818
> --- /dev/null
> +++ b/drivers/hwmon/lan969x-fan.c
[ ... ]
> +static int lan969x_fan_probe(struct platform_device *pdev)
> +{
> + struct thermal_cooling_device *cdev;
> + struct device *dev = &pdev->dev;
> + struct lan969x_fan *fan;
> + struct device_node *fan_np __free(device_node) = NULL;
> + u32 initial_pwm;
> + int ret;
> +
> + fan = devm_kzalloc(dev, sizeof(*fan), GFP_KERNEL);
> + if (!fan)
> + return -ENOMEM;
> +
> + fan->base = devm_platform_ioremap_resource(pdev, 0);
> + if (IS_ERR(fan->base))
> + return PTR_ERR(fan->base);
> +
> + fan->pulses_per_revolution = 2;
> + fan_np = of_get_available_child_by_name(dev->of_node, "fan");
[Severity: Low]
This isn't a bug, but per the cleanup.h conventions, fan_np should be
defined and initialized in a single statement at the point of assignment
rather than declared initialized to NULL at the top of
lan969x_fan_probe().
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261111161619.232141-1-robert.marko@sartura.hr?part=3
next prev parent reply other threads:[~2026-11-11 16:51 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-11 16:12 [PATCH v3 1/4] dt-bindings: hwmon: fan-common: reject zero pulses per revolution Robert Marko
2026-11-11 16:12 ` [PATCH v3 2/4] dt-bindings: hwmon: add Microchip LAN969x fan controller Robert Marko
2026-11-11 16:42 ` sashiko-bot
2026-11-12 1:06 ` Rob Herring (Arm)
2026-11-11 16:12 ` [PATCH v3 3/4] hwmon: Add Microchip LAN969x fan controller driver Robert Marko
2026-11-11 16:51 ` sashiko-bot [this message]
2026-11-11 16:12 ` [PATCH v3 4/4] arm64: dts: microchip: lan969x: add fan controller Robert Marko
2026-11-11 16:54 ` sashiko-bot
2026-11-11 16:39 ` [PATCH v3 1/4] dt-bindings: hwmon: fan-common: reject zero pulses per revolution sashiko-bot
2026-11-12 1:05 ` Rob Herring
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=sashiko-outbox-209333@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=linux-hwmon@vger.kernel.org \
--cc=robert.marko@sartura.hr \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.