diff options
| author | Janne Grunau <j@jannau.net> | 2026-02-15 09:02:51 +0100 |
|---|---|---|
| committer | Vinod Koul <vkoul@kernel.org> | 2026-02-27 20:32:39 +0530 |
| commit | 290a35756aaef85bbe0527eaf451f533a61b5f6c (patch) | |
| tree | b1c72882601ed363f40bd4d5c887a9219f34c589 /include/linux/platform_data | |
| parent | b6b7d1ae0653dcaa356be31c0de221311e922ccd (diff) | |
phy: apple: apple: Use local variable for ioremap return value
The indirection through the resources array is unnecessarily complicated
and resuling in using IS_ERR() and PTR_ERR() on a valid address. A local
variable for the devm_ioremap_resource() return value is both easier to
read and matches expectations when reading code.
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/asahi/aYXvX1bYOXtYCgfC@stanley.mountain/
Suggested-by: Vladimir Oltean <olteanv@gmail.com>
Fixes: 8e98ca1e74db ("phy: apple: Add Apple Type-C PHY")
Signed-off-by: Janne Grunau <j@jannau.net>
Reviewed-by: Sven Peter <sven@kernel.org>
Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
Link: https://patch.msgid.link/20260215-phy-apple-resource-err-ptr-v2-1-e43c22453682@jannau.net
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'include/linux/platform_data')
0 files changed, 0 insertions, 0 deletions
