Skip to content

Commit 9639948

Browse files
author
David S. Miller
committed
[NET] sunhme: Kill useless loop over sdevs in quattro_sbus_find().
Signed-off-by: David S. Miller <[email protected]>
1 parent c044220 commit 9639948

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

drivers/net/sunhme.c

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2568,14 +2568,10 @@ static void __init quattro_apply_ranges(struct quattro *qp, struct happy_meal *h
25682568
*/
25692569
static struct quattro * __init quattro_sbus_find(struct sbus_dev *goal_sdev)
25702570
{
2571-
struct sbus_bus *sbus;
25722571
struct sbus_dev *sdev;
25732572
struct quattro *qp;
25742573
int i;
25752574

2576-
if (qfe_sbus_list == NULL)
2577-
goto found;
2578-
25792575
for (qp = qfe_sbus_list; qp != NULL; qp = qp->next) {
25802576
for (i = 0, sdev = qp->quattro_dev;
25812577
(sdev != NULL) && (i < 4);
@@ -2584,17 +2580,7 @@ static struct quattro * __init quattro_sbus_find(struct sbus_dev *goal_sdev)
25842580
return qp;
25852581
}
25862582
}
2587-
for_each_sbus(sbus) {
2588-
for_each_sbusdev(sdev, sbus) {
2589-
if (sdev == goal_sdev)
2590-
goto found;
2591-
}
2592-
}
2593-
2594-
/* Cannot find quattro parent, fail. */
2595-
return NULL;
25962583

2597-
found:
25982584
qp = kmalloc(sizeof(struct quattro), GFP_KERNEL);
25992585
if (qp != NULL) {
26002586
int i;

0 commit comments

Comments
 (0)