U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/14] tree-wide: check dev_remap_addr() for NULL
@ 2026-09-03 21:35 David Lechner
  2026-09-03 21:35 ` [PATCH 01/14] power: pmic: mtk-pwrap: " David Lechner
                   ` (13 more replies)
  0 siblings, 14 replies; 17+ messages in thread
From: David Lechner @ 2026-09-03 21:35 UTC (permalink / raw)
  To: Jaehoon Chung, Peng Fan, Ryder Lee, Weijie Gao, Chunfeng Yun,
	Igor Belwon, Julien Stephan, GSS_MTK_Uboot_upstream, Tom Rini,
	Julien Masson, Bo-Chen Chen, Jerome Forissier, Daniel Schwierzeck,
	Joe Hershberger, Christian Marangi, Yang Xiwen, Marek Vasut,
	Bin Meng, Mattijs Korpershoek, Sjoerd Simons, Eugen Hristev,
	Claudiu Beznea, Casey Connolly, Neil Armstrong, Sumit Garg,
	Quentin Schulz, Kever Yang, Simon Glass, Chris Morgan, Ryan Chen,
	Chia-Wei Wang, Aspeed BMC SW team, Joel Stanley, Dylan Hung,
	Ilias Apalodimas
  Cc: Macpaul Lin, u-boot, Stefan Roese, Bhupesh Sharma, u-boot-qcom,
	David Lechner

We noticed a mistake in a few MediaTek drivers where we were checking
the return value of dev_remap_addr() and friends with IS_ERR(), but it
only ever returns NULL on failure.

Then we saw that we were not the only ones who did this. So here is a
series to clean it all up at once.

The return values are a bit inconsistent, but -EINVAL seems to be the most
common, so that is what is used in places that didn't already have a
specific error code or established convention in the file itself.

There were also a few cases that used IS_ERR_OR_NULL(), which isn't a
bug like IS_ERR(), but we clean them up too for correctness.

There are some places that don't check the return value, but I didn't
look into if those should be considered bugs or not.

Custodians: feel free to pick up any patches for your subsystem. And
I can take what is left through the MediaTek tree in a few weeks.

Signed-off-by: David Lechner <dlechner@baylibre.com>
---
David Lechner (14):
      power: pmic: mtk-pwrap: check dev_remap_addr() for NULL
      net: mt7628-eth: check dev_remap_addr_index() for NULL
      net: airoha_eth: check dev_remap_addr_name() for NULL
      net: hifemac: check dev_remap_addr_name() for NULL
      net: hifemac_mdio: check dev_remap_addr() for NULL
      usb: dwc3-octeon-glue: check dev_remap_addr() for NULL
      usb: dwc3-am62: check dev_remap_addr_index() for NULL
      timer: mchp-pit64b: check dev_read_addr_ptr() for NULL
      phy: qcom: snps-femto-v2: check dev_read_addr_ptr() for NULL
      phy: rockchip: inno-dsidphy: check dev_read_addr_ptr() for NULL
      pinctrl: aspeed: ast2600: check dev_read_addr_ptr() for NULL
      reset: ast2500: check dev_read_addr_ptr() for NULL
      reset: ast2600: check dev_read_addr_ptr() for NULL
      arm: aspeed: ast2600: check devfdt_get_addr_ptr() for NULL

 arch/arm/mach-aspeed/ast2600/board_common.c      |  3 +--
 arch/arm/mach-aspeed/ast2600/spl.c               |  3 +--
 drivers/net/airoha_eth.c                         |  4 ++--
 drivers/net/hifemac.c                            |  2 +-
 drivers/net/hifemac_mdio.c                       |  9 ++++-----
 drivers/net/mt7628-eth.c                         | 10 +++++-----
 drivers/phy/qcom/phy-qcom-snps-femto-v2.c        |  5 +++--
 drivers/phy/rockchip/phy-rockchip-inno-dsidphy.c |  5 +++--
 drivers/pinctrl/aspeed/pinctrl_ast2600.c         |  5 ++---
 drivers/power/pmic/mtk-pwrap.c                   |  4 ++--
 drivers/reset/reset-ast2500.c                    |  4 ++--
 drivers/reset/reset-ast2600.c                    |  4 ++--
 drivers/timer/mchp-pit64b-timer.c                |  4 ++--
 drivers/usb/dwc3/dwc3-am62.c                     |  2 +-
 drivers/usb/host/dwc3-octeon-glue.c              |  5 ++---
 15 files changed, 33 insertions(+), 36 deletions(-)
---
base-commit: 1c5004ffc5e3f000eca6cada32af7c83bd925c2b
change-id: 20260903-b4-dm-addr-null-checks-85b1450fa045

Best regards,
--  
David Lechner <dlechner@baylibre.com>


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2026-09-04 13:08 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-03 21:35 [PATCH 00/14] tree-wide: check dev_remap_addr() for NULL David Lechner
2026-09-03 21:35 ` [PATCH 01/14] power: pmic: mtk-pwrap: " David Lechner
2026-09-03 21:35 ` [PATCH 02/14] net: mt7628-eth: check dev_remap_addr_index() " David Lechner
2026-09-03 21:35 ` [PATCH 03/14] net: airoha_eth: check dev_remap_addr_name() " David Lechner
2026-09-03 21:35 ` [PATCH 04/14] net: hifemac: " David Lechner
2026-09-03 21:35 ` [PATCH 05/14] net: hifemac_mdio: check dev_remap_addr() " David Lechner
2026-09-03 21:35 ` [PATCH 06/14] usb: dwc3-octeon-glue: " David Lechner
2026-09-04 11:54   ` Mattijs Korpershoek
2026-09-03 21:35 ` [PATCH 07/14] usb: dwc3-am62: check dev_remap_addr_index() " David Lechner
2026-09-04 11:54   ` Mattijs Korpershoek
2026-09-03 21:35 ` [PATCH 08/14] timer: mchp-pit64b: check dev_read_addr_ptr() " David Lechner
2026-09-03 21:35 ` [PATCH 09/14] phy: qcom: snps-femto-v2: " David Lechner
2026-09-03 21:35 ` [PATCH 10/14] phy: rockchip: inno-dsidphy: " David Lechner
2026-09-03 21:35 ` [PATCH 11/14] pinctrl: aspeed: ast2600: " David Lechner
2026-09-03 21:35 ` [PATCH 12/14] reset: ast2500: " David Lechner
2026-09-03 21:35 ` [PATCH 13/14] reset: ast2600: " David Lechner
2026-09-03 21:35 ` [PATCH 14/14] arm: aspeed: ast2600: check devfdt_get_addr_ptr() " David Lechner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox