>>> +static int __init intel_menlow_module_init(void)
>>> +{
>>> +   int result = -ENODEV;
>>> +   acpi_status status;
>>> +   unsigned long enable;
>>> +
>>> +   if (acpi_disabled)
>>> +           return result;
>>> +
>>> +   /* Looking for the \_TZ.GSTS method */
>>> +   status = acpi_evaluate_integer(NULL, BIOS_ENABLED, NULL, &enable);
>>> +   if (ACPI_FAILURE(status) || !enable)
>>> +           return -ENODEV;
>>> +
>>> +   /* Looking for ACPI device MEM0 with hardware id INT0002 */
>>> +   result = acpi_bus_register_driver(&intel_menlow_memory_driver);
>>> +   if (result)
>>> +           return result;
>>> +
>>> +   /* Looking for sensors in each ACPI thermal zone */
>>> +   status = acpi_walk_namespace(ACPI_TYPE_THERMAL, ACPI_ROOT_OBJECT,
>>> +                                ACPI_UINT32_MAX,
>>> +                                intel_menlow_register_sensor, NULL, NULL);
>>> +   if (ACPI_FAILURE(status))
>>> +           result = -ENODEV;
>>> +
>> It seems to me this should be 'return -ENODEV;'
>>
>> You can just eliminate variable result, because result will be
>> -ENODEV only.
> I disagree. "result" is required to store the return value from 
> acpi_bus_register_driver which may be different from ENODEV. Otherwise it's 
> all -ENODEV.
> 
> :-Sujith

Indead, I overlooked it.

But the above 'result = -ENODEV;' should be 'return -ENODEV;', right?

>>> +   return 0;
>>> +}

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to