Commit b5a9adc
blk-cgroup: Return -ENOMEM directly in blkcg_css_alloc() error path
For blkcg_css_alloc(), the only error that will be returned is -ENOMEM.
Simplify error handling code by returning this error directly instead
of setting an intermediate "ret" variable.
Signed-off-by: Waiman Long <longman@redhat.com>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Acked-by: Tejun Heo <tj@kernel.org>
Link: https://lore.kernel.org/r/20221105005902.407297-2-longman@redhat.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>1 parent 077a403 commit b5a9adc
1 file changed
+4
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1139 | 1139 | | |
1140 | 1140 | | |
1141 | 1141 | | |
1142 | | - | |
1143 | 1142 | | |
1144 | 1143 | | |
1145 | 1144 | | |
| |||
1148 | 1147 | | |
1149 | 1148 | | |
1150 | 1149 | | |
1151 | | - | |
1152 | | - | |
| 1150 | + | |
1153 | 1151 | | |
1154 | | - | |
1155 | 1152 | | |
1156 | 1153 | | |
1157 | 1154 | | |
| |||
1168 | 1165 | | |
1169 | 1166 | | |
1170 | 1167 | | |
1171 | | - | |
1172 | | - | |
| 1168 | + | |
1173 | 1169 | | |
1174 | | - | |
| 1170 | + | |
1175 | 1171 | | |
1176 | 1172 | | |
1177 | 1173 | | |
| |||
1200 | 1196 | | |
1201 | 1197 | | |
1202 | 1198 | | |
1203 | | - | |
| 1199 | + | |
1204 | 1200 | | |
1205 | 1201 | | |
1206 | 1202 | | |
| |||
0 commit comments