mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-03-31 19:35:30 +00:00
hp_accel: Silence an uninitialized variable warning
If acpi_evaluate_integer() fails then "lret" isn't initialized. I've tweaked the error handling to avoid this issue. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
This commit is contained in:
parent
330a106508
commit
ff22b4806d
1 changed files with 3 additions and 1 deletions
|
@ -127,8 +127,10 @@ static int lis3lv02d_acpi_read(struct lis3lv02d *lis3, int reg, u8 *ret)
|
|||
arg0.integer.value = reg;
|
||||
|
||||
status = acpi_evaluate_integer(dev->handle, "ALRD", &args, &lret);
|
||||
if (ACPI_FAILURE(status))
|
||||
return -EINVAL;
|
||||
*ret = lret;
|
||||
return (status != AE_OK) ? -EINVAL : 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue