Some places in the driver use ENODEV for unsupported GPUs, while others use ENOTSUPP. ENOTSUPP is more accurate, so change the ENODEV instances to ENOTSUPP.
Cc: Alexandre Courbot <[email protected]> Cc: Danilo Krummrich <[email protected]> Cc: Timur Tabi <[email protected]> Cc: Joel Fernandes <[email protected]> Signed-off-by: John Hubbard <[email protected]> --- drivers/gpu/nova-core/gpu.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/nova-core/gpu.rs b/drivers/gpu/nova-core/gpu.rs index c1eca052968b..aa8e881dd474 100644 --- a/drivers/gpu/nova-core/gpu.rs +++ b/drivers/gpu/nova-core/gpu.rs @@ -62,7 +62,7 @@ impl TryFrom<u32> for Chipset { fn try_from(value: u32) -> Result<Self, Self::Error> { match value { $( $value => Ok(Chipset::$variant), )* - _ => Err(ENODEV), + _ => Err(ENOTSUPP), } } } @@ -143,7 +143,7 @@ fn try_from(value: u8) -> Result<Self> { 0x16 => Ok(Self::Turing), 0x17 => Ok(Self::Ampere), 0x19 => Ok(Self::Ada), - _ => Err(ENODEV), + _ => Err(ENOTSUPP), } } } -- 2.51.2
