summaryrefslogtreecommitdiffstats
path: root/perl-install/network
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/network')
-rw-r--r--perl-install/network/ethernet.pm7
1 files changed, 2 insertions, 5 deletions
diff --git a/perl-install/network/ethernet.pm b/perl-install/network/ethernet.pm
index a28f867dc..0327a6136 100644
--- a/perl-install/network/ethernet.pm
+++ b/perl-install/network/ethernet.pm
@@ -116,11 +116,8 @@ sub conf_network_card_backend {
return map {
my $interface = $_;
my $a = modules::get_alias($interface);
- my $b;
- foreach (@devs) {
- $_->{device} eq $interface and $b = $_->{driver};
- }
- $a ||= $b;
+ my $b = find { $_->{device} eq $interface } @devs;
+ $a ||= $b->{driver};
$a and $saved_driver = $a; # handle multiple cards managed by the same driver
[ $interface, $saved_driver ]
} @all_cards;