Commit 8f71d72
committed
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: 8e98ca1 ("phy: apple: Add Apple Type-C PHY")
Signed-off-by: Janne Grunau <j@jannau.net>1 parent 45be7f0 commit 8f71d72
1 file changed
Lines changed: 5 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2202 | 2202 | | |
2203 | 2203 | | |
2204 | 2204 | | |
| 2205 | + | |
2205 | 2206 | | |
2206 | 2207 | | |
2207 | 2208 | | |
2208 | | - | |
2209 | | - | |
2210 | | - | |
| 2209 | + | |
| 2210 | + | |
| 2211 | + | |
2211 | 2212 | | |
2212 | 2213 | | |
| 2214 | + | |
2213 | 2215 | | |
2214 | 2216 | | |
2215 | 2217 | | |
| |||
0 commit comments