Commit a2972cb
iommu/arm-smmu: Drop if with an always false condition
The remove and shutdown callback are only called after probe completed
successfully. In this case platform_set_drvdata() was called with a
non-NULL argument and so smmu is never NULL. Other functions in this
driver also don't check for smmu being non-NULL before using it.
Also note that returning an error code from a remove callback doesn't
result in the device staying bound. It's still removed and devm allocated
resources are freed (among others *smmu and the register mapping). So
after an early exit to iommu device stayed around and using it probably
oopses.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Robin Murphy <robin.murphy@arm.com>
Link: https://lore.kernel.org/r/20230321084125.337021-2-u.kleine-koenig@pengutronix.de
Signed-off-by: Joerg Roedel <jroedel@suse.de>1 parent e8d018d commit a2972cb
1 file changed
Lines changed: 0 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2195 | 2195 | | |
2196 | 2196 | | |
2197 | 2197 | | |
2198 | | - | |
2199 | | - | |
2200 | | - | |
2201 | 2198 | | |
2202 | 2199 | | |
2203 | 2200 | | |
| |||
2218 | 2215 | | |
2219 | 2216 | | |
2220 | 2217 | | |
2221 | | - | |
2222 | | - | |
2223 | | - | |
2224 | 2218 | | |
2225 | 2219 | | |
2226 | 2220 | | |
| |||
0 commit comments