Skip to content

Commit c1a65f4

Browse files
committed
fixup! rust: of: Add OF node abstraction
Signed-off-by: Janne Grunau <j@jannau.net>
1 parent 724f84a commit c1a65f4

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

rust/kernel/of.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ use core::marker::PhantomData;
1313
use core::num::NonZeroU32;
1414

1515
use crate::{
16+
alloc::flags::*,
1617
bindings, driver,
1718
driver::RawDeviceId,
1819
prelude::*,
@@ -398,7 +399,7 @@ impl<'a, T: PropertyUnit> TryFrom<Property<'a>> for Vec<T> {
398399
let mut v = Vec::new();
399400
let val = p.value();
400401
for off in (0..p.len()).step_by(T::UNIT_SIZE) {
401-
v.try_push(T::from_bytes(&val[off..off + T::UNIT_SIZE])?)?;
402+
v.push(T::from_bytes(&val[off..off + T::UNIT_SIZE])?, GFP_KERNEL)?;
402403
}
403404
Ok(v)
404405
}

0 commit comments

Comments
 (0)