From patchwork Wed Jun 9 17:51:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans de Goede X-Patchwork-Id: 457928 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7A8C2C48BCD for ; Wed, 9 Jun 2021 17:51:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 553D3608FE for ; Wed, 9 Jun 2021 17:51:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231785AbhFIRxd (ORCPT ); Wed, 9 Jun 2021 13:53:33 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:40606 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231873AbhFIRxb (ORCPT ); Wed, 9 Jun 2021 13:53:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1623261096; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=LDnuAzrmrDQnj1kMe7z9bfcxYs5KpfPfk3851+HN8rM=; b=SGdwoJgeSELVR/xfYT1PbVPTfuPOYTG1Ljfnnsa4ZQSBJ9SwGyzpeW+s31qF31L0Fx4Xci nD4LwFkkyRhQu3KONdJwKhplpB9sAJR3JwkgKOyWoMv1CfyvsmjNCkxfwuhxdYOkCWny3L krjOwkcykuXXWK/zZk33J5cqm/rWtjA= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-501-G0gEp-T1PFmMJw46BJnklw-1; Wed, 09 Jun 2021 13:51:33 -0400 X-MC-Unique: G0gEp-T1PFmMJw46BJnklw-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2C6F2101F7A3; Wed, 9 Jun 2021 17:51:32 +0000 (UTC) Received: from x1.localdomain.com (ovpn-113-55.ams2.redhat.com [10.36.113.55]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1D6311001281; Wed, 9 Jun 2021 17:51:30 +0000 (UTC) From: Hans de Goede To: "Rafael J . Wysocki" Cc: Hans de Goede , Mika Westerberg , linux-acpi@vger.kernel.org Subject: [PATCH] ACPI: Remove redundant clearing of context->ret.pointer from acpi_run_osc() Date: Wed, 9 Jun 2021 19:51:30 +0200 Message-Id: <20210609175130.224274-1-hdegoede@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org context->ret.pointer already gets set to NULL at the beginning of acpi_run_osc() and it only gets assigned a new value in the success path near the end of acpi_run_osc(), so the clearing of context->ret.pointer (when status != AE_OK) at the end of acpi_run_osc() is redundant since it will always already be NULL when status != AE_OK. Signed-off-by: Hans de Goede --- drivers/acpi/bus.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c index a4bd673934c0..ab41185cd2a8 100644 --- a/drivers/acpi/bus.c +++ b/drivers/acpi/bus.c @@ -262,8 +262,6 @@ acpi_status acpi_run_osc(acpi_handle handle, struct acpi_osc_context *context) out_kfree: kfree(output.pointer); - if (status != AE_OK) - context->ret.pointer = NULL; return status; } EXPORT_SYMBOL(acpi_run_osc);