diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/macintosh/via-pmu-led.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/macintosh/via-pmu-led.c b/drivers/macintosh/via-pmu-led.c index d242976bcfe7..19c371809d77 100644 --- a/drivers/macintosh/via-pmu-led.c +++ b/drivers/macintosh/via-pmu-led.c | |||
@@ -92,8 +92,10 @@ static int __init via_pmu_led_init(void) | |||
92 | if (dt == NULL) | 92 | if (dt == NULL) |
93 | return -ENODEV; | 93 | return -ENODEV; |
94 | model = of_get_property(dt, "model", NULL); | 94 | model = of_get_property(dt, "model", NULL); |
95 | if (model == NULL) | 95 | if (model == NULL) { |
96 | of_node_put(dt); | ||
96 | return -ENODEV; | 97 | return -ENODEV; |
98 | } | ||
97 | if (strncmp(model, "PowerBook", strlen("PowerBook")) != 0 && | 99 | if (strncmp(model, "PowerBook", strlen("PowerBook")) != 0 && |
98 | strncmp(model, "iBook", strlen("iBook")) != 0 && | 100 | strncmp(model, "iBook", strlen("iBook")) != 0 && |
99 | strcmp(model, "PowerMac7,2") != 0 && | 101 | strcmp(model, "PowerMac7,2") != 0 && |