From patchwork Tue Feb 6 22:04:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Armin Wolf X-Patchwork-Id: 197659 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:168b:b0:106:860b:bbdd with SMTP id ma11csp1850230dyb; Tue, 6 Feb 2024 14:06:14 -0800 (PST) X-Google-Smtp-Source: AGHT+IF3gM8c7RYvvIgw4bjLv9z9kOzYXH8uxQP1qNZoqz8ScW3LBY0TeTA9Nm8eRHOI3ZPyExJ/ X-Received: by 2002:a17:90b:f12:b0:296:344d:5a0b with SMTP id br18-20020a17090b0f1200b00296344d5a0bmr886825pjb.15.1707257173793; Tue, 06 Feb 2024 14:06:13 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707257173; cv=pass; d=google.com; s=arc-20160816; b=qxP9um/OJsP/wrGGGrRu41vp4LSfNLg869owDzvFFIz5m1AM8kgKHKUT4Br69dgN86 NftI4obTpvuwzG7gm+SPegmeQmenzjs6qZLpI4W95Qlke97X2QK6hkjO7HHU+jKMBUTw +WNFbkOrAnKQNPGyZSIJBd0V0YzE7rIFMFgDcvQo3KeyLREb6hjyc4EJ/+2MZWxE+BZR 1KVfa2VhiaELm9ko3AlDIw6GM2CD1YV7Wi6sZMDnpl1e1CWfJaNDOjvRD1HGh+PHoe/6 XODoJBAwwAQeUPU/5BWe/nJvuNOt9KSdbelnJvA0ReP329o+UKUICxwVyseAl3ig2Gpp guJg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=ui-outboundreport:content-transfer-encoding:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=gkyMFfMyQ8caUnoAwEOzxkUv26ICLI2ZXr8x++ylcnA=; fh=XSHEBN8RQ3QisCI/MDndJavfTBSHwrjggzUth72Ghy4=; b=EY1p0IThacnXxjZEnTm96mST4RWHAgTbueXEarU4z2oxfeygsIRSRQrjtCu8SlN0o3 b2ARZgv8OrAL6SHue/Bd33BZa+7XTSpTqeaSmVJGLTushoy41nAai04kWoeJE/KcsVDX s1+EhHTfAQjCMQxsCRmFjvlNUNCp/UisjN1MH/CL8Q70uighgCd683Ic795/I3TbzyNA vepF6JQ71c6ffY8QZwDqE5HSHeD+1I2ZMjAKC31UAE7FXoC1QqpxBwyhrwF//n+SxOLH vtHOP8rrZ69GKKhCXw0d8UXervCnCgMWB3gw8ywkqzgDY5Lv16f1C9SLMAXy51s/0k7B 6wGQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmx.de header.s=s31663417 header.b=Qyf+1Aln; arc=pass (i=1 spf=pass spfdomain=gmx.de dkim=pass dkdomain=gmx.de dmarc=pass fromdomain=gmx.de); spf=pass (google.com: domain of linux-kernel+bounces-55669-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-55669-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=gmx.de X-Forwarded-Encrypted: i=2; AJvYcCUrV9bQEg6V9FwXZ+su+t6Yne8aSPD914xf79rklzt9xz5Se9N8NDKDc2FKAVrKnoeiw+4WfrS8c1+QvcTw0Nq4HP+jHg== Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id e10-20020a17090a728a00b00295b66ff98csi599pjg.140.2024.02.06.14.06.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Feb 2024 14:06:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-55669-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmx.de header.s=s31663417 header.b=Qyf+1Aln; arc=pass (i=1 spf=pass spfdomain=gmx.de dkim=pass dkdomain=gmx.de dmarc=pass fromdomain=gmx.de); spf=pass (google.com: domain of linux-kernel+bounces-55669-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-55669-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=gmx.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 8E57E284CDE for ; Tue, 6 Feb 2024 22:06:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2ADDB1BF40; Tue, 6 Feb 2024 22:05:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmx.de header.i=w_armin@gmx.de header.b="Qyf+1Aln" Received: from mout.gmx.net (mout.gmx.net [212.227.15.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B94161BDE2; Tue, 6 Feb 2024 22:05:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=212.227.15.19 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707257113; cv=none; b=o+mH/UCHFbKzmCjAkmfJOQLUiDXfWtEPsMFALHfeNfHdBX3fryhrvENHJJAiNQOpiohr/qksTdBnRTzNKmKSxYUaKA3rJD925lmgsFw+/XHHEmMujE9G6ZHO2n8xpH0hVmQ5AcjOahympBuft8/YCzhPGvp0mnBKsZuluMfHKh4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707257113; c=relaxed/simple; bh=B23gbhjfbUKpvpzjOifemm6xIDpwsf1gr++jrmLvLaY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Jd7cpKvw5WhKoFBvkOSTuy8F5BqEZVs9KqV2iv/qjn9oky3uwVp9PSVWomgS8oQLL3DxAONy8Fx48JUHriCVOGP8nxVAhqH2zR41/EUcG/vb0uHJrjVRbkfTGeQzLOyEfdCHGZOw4dGWy7NYM2u0GK5OkuFETmaoaWpk7FN1jsg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.de; spf=pass smtp.mailfrom=gmx.de; dkim=pass (2048-bit key) header.d=gmx.de header.i=w_armin@gmx.de header.b=Qyf+1Aln; arc=none smtp.client-ip=212.227.15.19 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.de; s=s31663417; t=1707257104; x=1707861904; i=w_armin@gmx.de; bh=B23gbhjfbUKpvpzjOifemm6xIDpwsf1gr++jrmLvLaY=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To: References; b=Qyf+1AlnXKU817YWeKjQSW/V4LOVUzwv2B9Yv7g3DQrkFfm40gx2hIyCEvlKBp3y xysKtaCKKLoFcI80GVApyqVx8EirSCqUDiL8YlCsQi4qHbcZlYJfJKg6e9K1imOsT WZ7VN9XZ+6oI8P78xi1eFPOXwhrP8XlkB/4EBWmgNTy0+i1xBMq2D6vpENAqNd7yW NkcEWVq4PUyXAYrV68tCCkBqZ/vS9q2CQRNcLFBeYcd6VcQaaMOlCJ7UgK1POPxWX 8KqcD+kSgAPAb6LRHKKSINrB7Ts5BrMxJYfnzOtsZmyD5F1f561BPXT6AvfPsbf35 DmxrRpaucAFGnPBL+A== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from mx-amd-b650.users.agdsn.de ([141.30.226.129]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MTABZ-1rRixj1hz5-00UesZ; Tue, 06 Feb 2024 23:05:04 +0100 From: Armin Wolf To: hdegoede@redhat.com, ilpo.jarvinen@linux.intel.com Cc: platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/4] platform/x86: wmi: Remove unnecessary out-of-memory message Date: Tue, 6 Feb 2024 23:04:46 +0100 Message-Id: <20240206220447.3102-3-W_Armin@gmx.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240206220447.3102-1-W_Armin@gmx.de> References: <20240206220447.3102-1-W_Armin@gmx.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Provags-ID: V03:K1:f9SK+HvH8lNvtSB2c5q7kMi7Z6Z3bX/r7F5VCvPB80HyxzoKwhE onKmlgkxvI4n0ozaDg9R/MJ4T9Xk5Z1fTZU5NTnz6UG8r9H5zEezC2Rg+rpKDlzS+/TjdQj UL81J9W2Q1biMonLk5h/7+QywYKXlorZ1SC6MXxNXOPy/o1kTkIGg9kULDP5oO1teagDQ/1 K+m7y9KEU6RlpzNp2yrTA== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:sNu2xG2HF8Q=;49cTGIuGzKgX1nRsSbkqEk2AdrY WCIiBUJ5rgWmboCJW7p7ImpvPOkpmaM3CqRlOViF1/0CheNQyAkmPtdy0L9QPA1OBm5pGCe0F x3nhzQVQqxD76iXxWNnjBO7YcBWMgA5vjjr5Cm3SGf+a3Lw2AzmE7yPMZSIYXVJFjaSsUkVj0 h3NvCdzWb2QqaJhZEZ/I3oq602hZOYwWAxWEle1RHCy2s1U8fDumEp+9wqCeHHTiPJxGkoYrV KN9xZqBHwQaKmRWSOkbClvolMGu0w+8Ve3I5Jkbmyo5/o3NQ9gQl5zj6JaAwIrzMp5VtfuHir ilOLZ7+duVrqp2annmlPS0lfaHYhjp/iKb9X6J8rDKJPSNU86VC5zmzyn0NSfklp5Ovs+/Q7N uhyzNZZAu6kvDdL42shZAGQ+SQL6RuiqqLDBr6CxVMm8N0HXd+SzvbL1UiTZxXOv0TuaDQpX2 2ujMh6bOB1JHXgeIGnOIhgzE/mpGHOJSuUN/sC7ToGuBOZhNrFxj71Gi0O6zCtREye1wwXYCZ S97gOUhe9dPX19AHpPeLy0AvmzMyLnylJ8sX2c2SAZAtwT8PAJ0V0TtDfy2i+AlrD4cX1lB3F xIUQmZo/HCO3DK8oMkfhdg5rIysIkAsfRUT+5DumAxExyGpnnaujkNZVd1cuc5LaDBHH7XLe1 2oi+4viGwO69wpzFzlGh3DxiPob5mXKSIPbpcLdqswu/jfRBLcJEhCztbvco/JZVX+FCQ1isw jRZPxD2Im4GbtbYV6xx4c5I/zpJTEuC0juzEn/fGusZv0cq5n7K6S9eQv4GfoaOGeY+Xna3CD CeyQWBMmLmOkl0FDfhn1EtsEv0oGQNZCAD5Wh5yTBpR/I= X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790188898390661244 X-GMAIL-MSGID: 1790188898390661244 If kzalloc() fails, an out-of-memory message is already printed. Remove the unnecessary second warning message. Signed-off-by: Armin Wolf --- drivers/platform/x86/wmi.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) -- 2.39.2 diff --git a/drivers/platform/x86/wmi.c b/drivers/platform/x86/wmi.c index 545d6696d7cb..396344523bce 100644 --- a/drivers/platform/x86/wmi.c +++ b/drivers/platform/x86/wmi.c @@ -1127,10 +1127,8 @@ static int parse_wdg(struct device *wmi_bus_dev, struct platform_device *pdev) continue; wblock = kzalloc(sizeof(*wblock), GFP_KERNEL); - if (!wblock) { - dev_err(wmi_bus_dev, "Failed to allocate %pUL\n", &gblock[i].guid); + if (!wblock) continue; - } wblock->acpi_device = device; wblock->gblock = gblock[i];