summaryrefslogtreecommitdiff
path: root/drivers/gpu
diff options
context:
space:
mode:
authorMiguel Ojeda <ojeda@kernel.org>2026-07-11 20:02:31 +0200
committerDanilo Krummrich <dakr@kernel.org>2026-07-17 15:44:44 +0200
commit3fadfb9362cf1b7d0a775f406f011d78800d6054 (patch)
treed760346ac3185e91b5dd8798df6c5eaf9ec7c2cf /drivers/gpu
parent2b74f1f2024486c7a81915528b6aa7f8f5daa021 (diff)
downloadlinux-next-3fadfb9362cf1b7d0a775f406f011d78800d6054.tar.gz
linux-next-3fadfb9362cf1b7d0a775f406f011d78800d6054.zip
rust: firmware: avoid UB in example by passing parameter
The `Firmware` example crafts an `ARef<Device>` using a null pointer, which breaks the safety requirements of `Device::get_device()`. Instead, pass an `ARef` via a parameter, which is simpler, avoids UB and removes an `unsafe` block. Signed-off-by: Miguel Ojeda <ojeda@kernel.org> Reviewed-by: Alexandre Courbot <acourbot@nvidia.com> Reviewed-by: Gary Guo <gary@garyguo.net> Link: https://patch.msgid.link/20260711180231.229525-1-ojeda@kernel.org [ Also drop the second superfluous empty line. - Danilo ] Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Diffstat (limited to 'drivers/gpu')
0 files changed, 0 insertions, 0 deletions