{
int value = hp_wmi_read_int(HPWMI_DISPLAY_QUERY);
if (value < 0)
- return -EINVAL;
+ return value;
return sprintf(buf, "%d\n", value);
}
{
int value = hp_wmi_read_int(HPWMI_HDDTEMP_QUERY);
if (value < 0)
- return -EINVAL;
+ return value;
return sprintf(buf, "%d\n", value);
}
{
int value = hp_wmi_read_int(HPWMI_ALS_QUERY);
if (value < 0)
- return -EINVAL;
+ return value;
return sprintf(buf, "%d\n", value);
}
{
int value = hp_wmi_hw_state(HPWMI_DOCK_MASK);
if (value < 0)
- return -EINVAL;
+ return value;
return sprintf(buf, "%d\n", value);
}
{
int value = hp_wmi_hw_state(HPWMI_TABLET_MASK);
if (value < 0)
- return -EINVAL;
+ return value;
return sprintf(buf, "%d\n", value);
}
/* Get the POST error code of previous boot failure. */
int value = hp_wmi_read_int(HPWMI_POSTCODEERROR_QUERY);
if (value < 0)
- return -EINVAL;
+ return value;
return sprintf(buf, "0x%x\n", value);
}