summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanilo Krummrich <dakr@redhat.com>2024-01-11 23:21:12 +0100
committerDanilo Krummrich <dakr@redhat.com>2024-01-11 23:21:12 +0100
commitcd2a7b5582bdcab80bd38e7c79ac71a944859281 (patch)
treec3a51013215834ca6d5444cfc3dafd56ee16138a
parenta5283a2f1e9febb001436257bcf09f8f9403bd4e (diff)
nova: bios: handle result from Vec::try_push
Signed-off-by: Danilo Krummrich <dakr@redhat.com>
-rw-r--r--drivers/gpu/drm/nova/bios.rs20
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/gpu/drm/nova/bios.rs b/drivers/gpu/drm/nova/bios.rs
index 6cc848132f40..2433d583e19a 100644
--- a/drivers/gpu/drm/nova/bios.rs
+++ b/drivers/gpu/drm/nova/bios.rs
@@ -360,20 +360,20 @@ impl Bios {
pr_info!("bios size {:#x}\n", self.bios_vec.len());
let mut bmp_vec = Vec::new();//vec![];//0xff, 0x7f, 0x78, 0x86, 0x00];
- bmp_vec.try_push(0xff);
- bmp_vec.try_push(0x7f);
- bmp_vec.try_push(0x78);
- bmp_vec.try_push(0x86);
- bmp_vec.try_push(0x00);
+ bmp_vec.try_push(0xff)?;
+ bmp_vec.try_push(0x7f)?;
+ bmp_vec.try_push(0x78)?;
+ bmp_vec.try_push(0x86)?;
+ bmp_vec.try_push(0x00)?;
self.bmp_offset = self.findbytes(&bmp_vec);
pr_info!("bmp offset is {:#x} {:#x}\n", bmp_vec.len(), self.bmp_offset);
let mut bit_vec = Vec::new();//ec![0xff, 0xb8, 'B', 'I', 'T'];
- bit_vec.try_push(0xff);
- bit_vec.try_push(0xb8);
- bit_vec.try_push('B' as u8);
- bit_vec.try_push('I' as u8);
- bit_vec.try_push('T' as u8);
+ bit_vec.try_push(0xff)?;
+ bit_vec.try_push(0xb8)?;
+ bit_vec.try_push('B' as u8)?;
+ bit_vec.try_push('I' as u8)?;
+ bit_vec.try_push('T' as u8)?;
self.bit_offset = self.findbytes(&bit_vec);
pr_info!("bit offset is {:#x} {:#x}\n", bit_vec.len(), self.bit_offset);