[PATCH 0/2] pinctrl: canaan: k230: Fix DT parsing and registration order

Ze Huang posted 2 patches 3 months, 2 weeks ago
drivers/pinctrl/pinctrl-k230.c | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
[PATCH 0/2] pinctrl: canaan: k230: Fix DT parsing and registration order
Posted by Ze Huang 3 months, 2 weeks ago
This patch set fixes two issues in the Canaan K230 pinctrl driver:

1. Adds a NULL check for the "pinmux" property in the device tree parser to
   prevent potential NULL pointer dereference, and fixes a typo in the
   match table comment.

2. Moves the DT parsing step before pinctrl registration to ensure that
   pin resources are fully initialized before being used.

Signed-off-by: Ze Huang <huangze@whut.edu.cn>
---
Ze Huang (2):
      pinctrl: canaan: k230: add NULL check in DT parse
      pinctrl: canaan: k230: Fix order of DT parse and pinctrl register

 drivers/pinctrl/pinctrl-k230.c | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)
---
base-commit: d9946fe286439c2aeaa7953b8c316efe5b83d515
change-id: 20250620-k230-return-check-d2ca51963064

Best regards,
-- 
Ze Huang <huangze@whut.edu.cn>
Re: [PATCH 0/2] pinctrl: canaan: k230: Fix DT parsing and registration order
Posted by Linus Walleij 3 months, 2 weeks ago
On Mon, Jun 23, 2025 at 6:11 PM Ze Huang <huangze@whut.edu.cn> wrote:

> This patch set fixes two issues in the Canaan K230 pinctrl driver:
>
> 1. Adds a NULL check for the "pinmux" property in the device tree parser to
>    prevent potential NULL pointer dereference, and fixes a typo in the
>    match table comment.
>
> 2. Moves the DT parsing step before pinctrl registration to ensure that
>    pin resources are fully initialized before being used.
>
> Signed-off-by: Ze Huang <huangze@whut.edu.cn>

Patches applied!

Yours,
Linus Walleij