Skip to content

Commit e35eb56

Browse files
weirdsmileyNipaLocal
authored and
NipaLocal
committed
net: phy: qt2025: simplify Result<()> in probe return
probe returns a `Result<()>` type, which can be simplified as `Result`, due to default type parameters being unit `()` and `Error` types. This maintains a consistent usage of `Result` throughout codebase. Suggested-by: Miguel Ojeda <[email protected]> Link: Rust-for-Linux#1128 Signed-off-by: Manas <[email protected]> Reviewed-by: Miguel Ojeda <[email protected]> Signed-off-by: NipaLocal <nipa@local>
1 parent e943905 commit e35eb56

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/phy/qt2025.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ impl Driver for PhyQT2025 {
3939
const NAME: &'static CStr = c_str!("QT2025 10Gpbs SFP+");
4040
const PHY_DEVICE_ID: phy::DeviceId = phy::DeviceId::new_with_exact_mask(0x0043a400);
4141

42-
fn probe(dev: &mut phy::Device) -> Result<()> {
42+
fn probe(dev: &mut phy::Device) -> Result {
4343
// Check the hardware revision code.
4444
// Only 0x3b works with this driver and firmware.
4545
let hw_rev = dev.read(C45::new(Mmd::PMAPMD, 0xd001))?;

0 commit comments

Comments
 (0)