diff options
Diffstat (limited to 'arch/powerpc/platforms/powermac/low_i2c.c')
-rw-r--r-- | arch/powerpc/platforms/powermac/low_i2c.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/powerpc/platforms/powermac/low_i2c.c b/arch/powerpc/platforms/powermac/low_i2c.c index f45331ab97cb..06a137c5b8bb 100644 --- a/arch/powerpc/platforms/powermac/low_i2c.c +++ b/arch/powerpc/platforms/powermac/low_i2c.c | |||
@@ -592,7 +592,7 @@ static void __init kw_i2c_probe(void) | |||
592 | /* Probe keywest-i2c busses */ | 592 | /* Probe keywest-i2c busses */ |
593 | for_each_compatible_node(np, "i2c","keywest-i2c") { | 593 | for_each_compatible_node(np, "i2c","keywest-i2c") { |
594 | struct pmac_i2c_host_kw *host; | 594 | struct pmac_i2c_host_kw *host; |
595 | int multibus, chans, i; | 595 | int multibus; |
596 | 596 | ||
597 | /* Found one, init a host structure */ | 597 | /* Found one, init a host structure */ |
598 | host = kw_i2c_host_init(np); | 598 | host = kw_i2c_host_init(np); |
@@ -614,6 +614,8 @@ static void __init kw_i2c_probe(void) | |||
614 | * parent type | 614 | * parent type |
615 | */ | 615 | */ |
616 | if (multibus) { | 616 | if (multibus) { |
617 | int chans, i; | ||
618 | |||
617 | parent = of_get_parent(np); | 619 | parent = of_get_parent(np); |
618 | if (parent == NULL) | 620 | if (parent == NULL) |
619 | continue; | 621 | continue; |
@@ -1258,8 +1260,7 @@ static void pmac_i2c_do_end(struct pmf_function *func, void *instdata) | |||
1258 | if (inst == NULL) | 1260 | if (inst == NULL) |
1259 | return; | 1261 | return; |
1260 | pmac_i2c_close(inst->bus); | 1262 | pmac_i2c_close(inst->bus); |
1261 | if (inst) | 1263 | kfree(inst); |
1262 | kfree(inst); | ||
1263 | } | 1264 | } |
1264 | 1265 | ||
1265 | static int pmac_i2c_do_read(PMF_STD_ARGS, u32 len) | 1266 | static int pmac_i2c_do_read(PMF_STD_ARGS, u32 len) |