From patchwork Thu Jun 10 06:47:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AceLan Kao X-Patchwork-Id: 1490204 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=gHR0ZLo6; dkim-atps=neutral Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4G0vgk5LvLz9sVt; Thu, 10 Jun 2021 16:48:18 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1lrEUB-0002ZB-Lz; Thu, 10 Jun 2021 06:48:15 +0000 Received: from mail-pj1-f51.google.com ([209.85.216.51]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1lrEU4-0002Ur-QE for kernel-team@lists.ubuntu.com; Thu, 10 Jun 2021 06:48:08 +0000 Received: by mail-pj1-f51.google.com with SMTP id x21-20020a17090aa395b029016e25313bfcso3207890pjp.2 for ; Wed, 09 Jun 2021 23:48:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=kgAqub5mT+NsYAuXTNx326YWDh9xXebovrR6zb3Idds=; b=gHR0ZLo60nniOkZqKjeZvgJlkhB3Pb/1v73ujUOjRgDIMJ2Qr+Mq0wU2eqX0J6LpRN pYOc1DkM3Tp+Vry4I6rX8JnBQsw4qTd1GXgqirVJidHLs6/4UxlX8x+yLIzo0cBo5MHY BfW1bLGnezt1L40MIAybzE2AWGBJKi3moK0R4OSLk3ywu+/PZEiNcXhgTvJNRI77Kf2f b3prCVh1RlC/p81Sf+/z6xZb4oPF1y2Tw3sJWAr4cqGKPQ5iEycKrJHurRMOq0bvyGyt Jx1N3fOOonm9P5iRhF3Ecfradi2mfiDZRrJgCqemm9pRiQpZgy34ayvDh0qpIVAdrJnt 664w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=kgAqub5mT+NsYAuXTNx326YWDh9xXebovrR6zb3Idds=; b=POl08OEBJkHFX3vHdC6IGfNB9VJBJPlaWkw9G67s4Lx4gHv8n6WFSe7Z7oPE7uWHRr ClQOpQBkxJ5nHIPQWoP+EszOy8tyD7ZWtGav+9T+Uz9Cl1slicEXzfWB2UXdmYy2YbLX LjwvTCXAjDNKLULOKL7XtstLM58z0RhiYfDlFNFoS7rlEMPuRnUmy1ZHmaYYxMljkU1m F47kRm+GyDiqYSwrl73f4cIURgkgDLtbFdE3SI3fIhKa4wBB3dpxfI398kdN6+8GNe9u HMiMIQc7Cp73qsHkgKYJroodLSmU1nX2KsO9xcrLhPTOuKawXybptcFeje9hpwjP5yyG IysA== X-Gm-Message-State: AOAM531cMcRWehpFBfxXjjSvtpvxT9NNVjFsu/GWSo8vUDJXkYqLVAx0 Y7GbvFSrH8plIeWKmo6C5XJK1NdzMgZBNVqY X-Google-Smtp-Source: ABdhPJytXcrbnXJ2L34g+E1ushhCCcCLdUjtYpIaSW/Esi/5AnBtG6gZWfiOUYFywKB3RQdWKeXllg== X-Received: by 2002:a17:902:ff11:b029:114:37a7:21ad with SMTP id f17-20020a170902ff11b029011437a721admr3268027plj.68.1623307686222; Wed, 09 Jun 2021 23:48:06 -0700 (PDT) Received: from localhost (220-135-95-34.HINET-IP.hinet.net. [220.135.95.34]) by smtp.gmail.com with ESMTPSA id o186sm1374411pfb.59.2021.06.09.23.48.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Jun 2021 23:48:05 -0700 (PDT) From: AceLan Kao To: kernel-team@lists.ubuntu.com Subject: [PATCH 3/7][SRU][OEM-5.10] platform/x86: dell-wmi-sysman: Fix release_attributes_data() getting called twice on init_bios_attributes() failure Date: Thu, 10 Jun 2021 14:47:50 +0800 Message-Id: <20210610064754.1061717-4-acelan.kao@canonical.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210610064754.1061717-1-acelan.kao@canonical.com> References: <20210610064754.1061717-1-acelan.kao@canonical.com> MIME-Version: 1.0 Received-SPF: pass client-ip=209.85.216.51; envelope-from=acelan@gmail.com; helo=mail-pj1-f51.google.com X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Hans de Goede BugLink: https://bugs.launchpad.net/bugs/1931509 All calls of init_bios_attributes() will result in a goto fail_create_group if they fail, which calls release_attributes_data(). So there is no need to call release_attributes_data() from init_bios_attributes() on failure itself. Fixes: e8a60aa7404b ("platform/x86: Introduce support for Systems Management Driver over WMI for Dell Systems") Cc: Divya Bharathi Cc: Mario Limonciello Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20210321115901.35072-5-hdegoede@redhat.com (cherry picked from commit f4c4e9ad1523a32a78f5caf68f1b346a30035481) Signed-off-by: Chia-Lin Kao (AceLan) --- drivers/platform/x86/dell/dell-wmi-sysman/sysman.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/platform/x86/dell/dell-wmi-sysman/sysman.c b/drivers/platform/x86/dell/dell-wmi-sysman/sysman.c index c40d5658c7c42..8bc44316648ff 100644 --- a/drivers/platform/x86/dell/dell-wmi-sysman/sysman.c +++ b/drivers/platform/x86/dell/dell-wmi-sysman/sysman.c @@ -498,7 +498,6 @@ static int init_bios_attributes(int attr_type, const char *guid) err_attr_init: mutex_unlock(&wmi_priv.mutex); - release_attributes_data(); kfree(obj); return retval; }