Commit b083c22
video: fbdev: imxfb: Convert request_mem_region + ioremap to devm_ioremap_resource
This has several advantages:
- No need for manual undo of the two functions in the error path and
the remove function.
- Drops error handling in .remove()
Note that returning early in .remove() yields resource leaks that
often result in access of freed memory or unmapped registers later.
- Fixes a resource leak
request_mem_region allocates memory for the returned pointer that was
never freed.
Signed-off-by: Uwe Kleine-König <[email protected]>
Signed-off-by: Helge Deller <[email protected]>1 parent ded77a7 commit b083c22
1 file changed
+1
-17
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
937 | 937 | | |
938 | 938 | | |
939 | 939 | | |
940 | | - | |
941 | | - | |
942 | | - | |
943 | | - | |
944 | | - | |
945 | | - | |
946 | | - | |
947 | 940 | | |
948 | 941 | | |
949 | 942 | | |
| |||
977 | 970 | | |
978 | 971 | | |
979 | 972 | | |
980 | | - | |
| 973 | + | |
981 | 974 | | |
982 | 975 | | |
983 | 976 | | |
| |||
1049 | 1042 | | |
1050 | 1043 | | |
1051 | 1044 | | |
1052 | | - | |
1053 | 1045 | | |
1054 | 1046 | | |
1055 | 1047 | | |
1056 | | - | |
1057 | 1048 | | |
1058 | 1049 | | |
1059 | 1050 | | |
| |||
1065 | 1056 | | |
1066 | 1057 | | |
1067 | 1058 | | |
1068 | | - | |
1069 | | - | |
1070 | | - | |
1071 | | - | |
1072 | | - | |
1073 | 1059 | | |
1074 | 1060 | | |
1075 | 1061 | | |
1076 | 1062 | | |
1077 | 1063 | | |
1078 | 1064 | | |
1079 | 1065 | | |
1080 | | - | |
1081 | | - | |
1082 | 1066 | | |
1083 | 1067 | | |
1084 | 1068 | | |
| |||
0 commit comments