Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp4401245rdb; Thu, 28 Dec 2023 23:43:18 -0800 (PST) X-Google-Smtp-Source: AGHT+IHA4i0nk9qiduURD8AoqadYD/6wt1GR2bKiGO0Qo+gtyB9oivPH0YZSi6xttDwfj6EoQfdm X-Received: by 2002:a50:cd41:0:b0:54c:b88a:7a69 with SMTP id d1-20020a50cd41000000b0054cb88a7a69mr6598985edj.73.1703835798169; Thu, 28 Dec 2023 23:43:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703835798; cv=none; d=google.com; s=arc-20160816; b=fsnf689lG2x9JsRn9VqSS5BSBjtDyPkEsedAHz3M9mYtSZAluqQ0aEJrAXGlH5ZoeJ pgVA/uLF2P/uoPhTLZVp6opxrtOwPTtt3bwtAt6Is2LEZ7p+BLGIhB5fQvzEahyX7OBR jKManIRnHDUb4AnMDnvIMKOCA0COQgzJR51BRNkP7+Pywpzwn4pFBz3WP1YoHcFZVRSR 5ig+PP+ul71nhKqIQKZcgy0unByvhhT6RUysczx/7ZdeWOrIKU9K9jngUfFMp0GzOiJf 8R/VaAIXeBRedHYBRnBMfKVO8QV94fq9hoZQYcFGNRUiE9l5VWYsC7ka+u1kip8pUE/y Wuzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=DSZUFKqdAkWuN/kPVFG1g+yNtSLVGaxATVMRCqbLdNs=; fh=QxMqIkN8Dl6TLcDFFHwwhHfJvAzBLam/1p5zCnu3EEg=; b=yiDc2/EbwwInvC53H7a/WWJYP2mr+97ZHZ21FbYYpwuiBxiDxWB9iqIYv6mRCusfQw lh9z+DREDhqBBdu8F77CYm96tJGuI83MgVkeXNWoEa+9RhUXn5G/9CGGugftR4+vPFbQ AIFpcjoSd6rJ4zCvP57BkTLUX9V6y0wgPkjndbNTFv1jP020C9ENqy9mSlaEAwOXjXGQ kgf4AFQOhPZJCVuxLFXmP6sP1f2JykemvUlXR2uL+52lWGEnWhaAELLm1TkvM58dzz+S NCmt5Q2B1ykn9wm7OKhT7L1B/XH3JXD3xuPOA0nfsAcn7a4pQTNgLQiZYUxe/W0coHaJ ro4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=jKV44YdX; spf=pass (google.com: domain of linux-kernel+bounces-12970-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-12970-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id bt14-20020a0564020a4e00b00553723ca2e7si7430832edb.309.2023.12.28.23.43.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Dec 2023 23:43:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-12970-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=jKV44YdX; spf=pass (google.com: domain of linux-kernel+bounces-12970-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-12970-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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 am.mirrors.kernel.org (Postfix) with ESMTPS id E7A1B1F236B9 for ; Fri, 29 Dec 2023 07:43:17 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A91726FC4; Fri, 29 Dec 2023 07:43:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="jKV44YdX" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-pf1-f179.google.com (mail-pf1-f179.google.com [209.85.210.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BEC20568F; Fri, 29 Dec 2023 07:43:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pf1-f179.google.com with SMTP id d2e1a72fcca58-6d9af1f12d5so3378967b3a.3; Thu, 28 Dec 2023 23:43:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1703835784; x=1704440584; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=DSZUFKqdAkWuN/kPVFG1g+yNtSLVGaxATVMRCqbLdNs=; b=jKV44YdXFPx1uMBe5JyXFF5LECn8O9/QwRrDHJqhVtsKujOz/PAEaKevt7r/+YI1It G8FHeROxWs4rMnmP5wjeFs2hlKNDa8pKontRu1xCNbHZmVB7IyMMR8TA6KBKIRrymt2g wYVJd22+/v+GmicR1s+PRzcMv3LMimuqn9uOliuEHn1o5IuPENTLD2crXOBW06PRsmc3 r0Xs/5XqkJy8o2qoS3HRR7MYdoTZPYFvb7RgxNDrfYPdeZ7Y2526NE0DriLrcHYRzDW8 9OX5IA2O7k3x5GSKEGTgyHDIRbFeZVL0l//B7u9pS6q9HAsNKNIP/1gnyyCBRSOXff0S 5d7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703835784; x=1704440584; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=DSZUFKqdAkWuN/kPVFG1g+yNtSLVGaxATVMRCqbLdNs=; b=dnGklOZDq3qkC9GwlA3d/gWkN4ot9cEAKdSjlWgKzBBTf4ckWV1WGawCvle3oeGkzi DHbza0KOjkJ1XX0JQsmvzMyoVmi9HaqwIWtAz3ebjrhxTGzBANsF5BWNGVi0Pqxkd1M2 GqFpu7nj99QqzYJW/5W+NOfFM3NjjlE+fDRjar2d7AKcv7mXxZEOgV84tvFVhJiT7+PT 9B73nYRvyebOrrUaNxDrwE4NnWHA6VQ7cJkvvJCBx7/7Av7gFkAQMNx9pov65m9zDw8g 9rwgURvPI55QXNGtEk7hbFuWZukjoV8IW/CJ06VK/C1HCEamJvwjr+NrjA0yCfrC4ZfS VhqA== X-Gm-Message-State: AOJu0YzXLAqARmItK12B6P+YfY9pCqFF3MV7NEb7QwdnA9lVpuZ/J7OY SH2TY2Vcc4JyeVRsDjHLWgc= X-Received: by 2002:a05:6a20:9388:b0:196:60d8:187e with SMTP id x8-20020a056a20938800b0019660d8187emr1962378pzh.57.1703835783844; Thu, 28 Dec 2023 23:43:03 -0800 (PST) Received: from google.com ([2620:15c:9d:2:1995:632f:ef1e:946e]) by smtp.gmail.com with ESMTPSA id f3-20020a17090a638300b0028c8149ac6esm6148076pjj.42.2023.12.28.23.43.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Dec 2023 23:43:03 -0800 (PST) Date: Thu, 28 Dec 2023 23:43:01 -0800 From: Dmitry Torokhov To: Markus Elfring Cc: linux-input@vger.kernel.org, kernel-janitors@vger.kernel.org, Henrik Rydberg , LKML , cocci@inria.fr Subject: Re: [PATCH] Input: MT - Return directly after a failed kzalloc() in input_mt_init_slots() Message-ID: References: <5088a905-4f29-41d3-a96e-5b66aad551f1@web.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <5088a905-4f29-41d3-a96e-5b66aad551f1@web.de> On Tue, Dec 26, 2023 at 08:43:37PM +0100, Markus Elfring wrote: > From: Markus Elfring > Date: Tue, 26 Dec 2023 20:36:09 +0100 > > The kfree() function was called in one case by > the input_mt_init_slots() function during error handling > even if the passed variable contained a null pointer. > This issue was detected by using the Coccinelle software. > > Thus return directly after a call of the function “kzalloc” failed > at the beginning. This is not needed. The same arguments as on the patch to usbtouchscreen.c. Thanks. -- Dmitry