- if (!fan || (off != 0))
- goto end;
-
- if (acpi_bus_get_power(fan->handle, &state))
- goto end;
-
- p += sprintf(p, "status: %s\n",
- !state?"on":"off");
-
-end:
- len = (p - page);
- if (len <= off+count) *eof = 1;
- *start = page + off;
- len -= off;
- if (len>count) len = count;
- if (len<0) len = 0;
-
- return_VALUE(len);
+ if (fan) {
+ if (acpi_bus_get_power(fan->handle, &state))
+ seq_printf(seq, "status: ERROR\n");
+ else
+ seq_printf(seq, "status: %s\n",
+ !state ? "on" : "off");
+ }
+ return_VALUE(0);