Skip to content

Commit df09413

Browse files
committed
fixup! drm/asahi: slotalloc: Allow initializing empty slots
Signed-off-by: Janne Grunau <j@jannau.net>
1 parent 01c6a48 commit df09413

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

drivers/gpu/drm/asahi/slotalloc.rs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -140,11 +140,14 @@ impl<T: SlotItem> SlotAllocator<T> {
140140

141141
for i in 0..num_slots {
142142
slots
143-
.try_push(constructor(&mut data, i).map(|item| Entry {
144-
item,
145-
get_time: 0,
146-
drop_time: 0,
147-
}))
143+
.push(
144+
constructor(&mut data, i).map(|item| Entry {
145+
item,
146+
get_time: 0,
147+
drop_time: 0,
148+
}),
149+
GFP_KERNEL,
150+
)
148151
.expect("try_push() failed after reservation");
149152
}
150153

0 commit comments

Comments
 (0)