ACPI: EC: Simplify error handling in advance_transaction()
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 23 Nov 2020 19:00:34 +0000 (20:00 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 23 Nov 2020 19:00:34 +0000 (20:00 +0100)
commit902675fa87e3a3d433481a2df6e50c10da5e20c2
treef461a671dd459e1ac35a52ef9038cec358d3709c
parentd2a2e6ccebb80d297f9827743f49d0f70b4a2daa
ACPI: EC: Simplify error handling in advance_transaction()

Notice that the value of t in advance_transaction() does not change
after its initialization and:

 - Initialize t upfront (and rearrange the definitions of local
   variables while at it).

 - Check it against NULL in a block executed when it is NULL.

 - Skip error handling for t == NULL, because a valid pointer value
   of t is required for the error handling.

 - Drop the (now redundant) check of t against NULL from the error
   handling block and reduce the indentation level in there.

No intentional functional impact.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/ec.c