ACK: [PATCH 2/3] acpi: drtm: remove redundant assigments to passed on errors
ivanhu
ivan.hu at canonical.com
Thu Mar 2 06:51:28 UTC 2017
On 03/01/2017 03:02 AM, Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
>
> There are several occurrances where passed is set to false and
> the error exit path via the error label is a direct return hence
> the setting of passed is redundant and can be removed.
>
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
> src/acpi/drtm/drtm.c | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/src/acpi/drtm/drtm.c b/src/acpi/drtm/drtm.c
> index fae1f7e..8149b27 100644
> --- a/src/acpi/drtm/drtm.c
> +++ b/src/acpi/drtm/drtm.c
> @@ -82,7 +82,6 @@ static int drtm_test1(fwts_framework *fw)
> offset += sizeof(drtm_vtl->validated_table_count);
>
> if (drtm->header.length < offset + sizeof(uint64_t) * drtm_vtl->validated_table_count) {
> - passed = false;
> fwts_failed(fw, LOG_LEVEL_HIGH,
> "DRTMOutOfBound",
> "DRTM's length is too small to contain all fields");
> @@ -101,7 +100,6 @@ static int drtm_test1(fwts_framework *fw)
> offset += sizeof(drtm_rtl->resource_count);
>
> if (drtm->header.length < offset + sizeof(fwts_acpi_drtm_resource) * drtm_rtl->resource_count) {
> - passed = false;
> fwts_failed(fw, LOG_LEVEL_HIGH,
> "DRTMOutOfBound",
> "DRTM's length is too small to contain all fields");
> @@ -136,7 +134,6 @@ static int drtm_test1(fwts_framework *fw)
> fwts_log_info_verbatim(fw, " DPS_Length: 0x%8.8" PRIx32, drtm_dps->dps_id_length);
>
> if (drtm->header.length < offset + sizeof(fwts_acpi_table_drtm_dps)) {
> - passed = false;
> fwts_failed(fw, LOG_LEVEL_HIGH,
> "DRTMOutOfBound",
> "DRTM's length is too small to contain all fields");
>
Acked-by: Ivan Hu <ivan.hu at canonical.com>
More information about the fwts-devel
mailing list