Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp288230pxj; Wed, 26 May 2021 23:30:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwmP6Km9MFdZp0S35gkrz79gzojeAl0iPyC0GZgx2+PvuvhMrGsPQ1uQsfE95RADbt+ctEM X-Received: by 2002:a17:906:c1c5:: with SMTP id bw5mr2143623ejb.552.1622097012035; Wed, 26 May 2021 23:30:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622097012; cv=none; d=google.com; s=arc-20160816; b=XWIUm6gyDYs0RxQVWdAlCrPaKOZ/xCo3sdR0xyytT4QVYPXrLCaC3e3Lptmy7MeQUh DOe2/f4EIq2GmbMoU0Ds/Q8AsR/FR9MNtXOJrmVI9rAyfP3DoPGkKTjAv9BYiajES+9B pAPg8hTLWEdnJgyqAfcprlB6OXDcWtfbbtoOiFEim0mHyf/jWwEflQ9iybZ4uuiwx5zW zoV+ZY3ZYVD+MunIPwaHhb9WrWyG2Ha7/X5PRxp58G3rUyogPuZkCslPHdEiXgnI4Dc8 61MI9gyBBpEx4Hzz4a8bhvBTiic2h6EUE4kFQY80n/RHlOJdBYU+ViI6m+KnUofJbGH9 yDug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:subject:cc:to:from:message-id :date:dkim-signature:dkim-signature; bh=hl0khCFoLI0oRhRpVSDBmDjEyhT/A0eO1VQGtupP81w=; b=0PZ7S0gA6D32RSmng/kC5OjzpZp07De4hEM7rrJV1cOc1hp/5fjRgUcrVX4lNNVJCQ ky+29vaIwSsTibBdSn6/YCWh2Zvc5cAI1RUN8pKpS5xfCjYcQOcnxb7WIh61wXCAd6VE j91ZnegJe/TrcsvthMOoSBtwsChj6Z5WQ59aFupF5VKsVd3y1ULHaKZPZFmSZyIKmby6 8+RSAA7UgcWLmK0cHQxWh2N7XvdKhI8QXjhcpfFNVSDXX/eq97izdCnNoukK4IBSNrSI vVo5c9d+A5fDBfWbDeQMecAMrsya7P9I1Cuu7+omwIy2HLSkRwLK4siaeZkOKPq6X+QI 6vpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=BvZ1wv+F; dkim=neutral (no key) header.i=@suse.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r21si1634113ejo.341.2021.05.26.23.29.48; Wed, 26 May 2021 23:30:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=BvZ1wv+F; dkim=neutral (no key) header.i=@suse.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234277AbhE0GX7 (ORCPT + 99 others); Thu, 27 May 2021 02:23:59 -0400 Received: from mx2.suse.de ([195.135.220.15]:57976 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229670AbhE0GX6 (ORCPT ); Thu, 27 May 2021 02:23:58 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1622096544; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=hl0khCFoLI0oRhRpVSDBmDjEyhT/A0eO1VQGtupP81w=; b=BvZ1wv+F+rlwWuPEutDMlhemGamH+w7VVOAiBFtZs1GvD915MfiqdPufur/RKl8HqGodps 2hV5+4IYJMB9l4WJB9Ag+pJYJrgSxdbiscruBbK19IfWTXFmVJsqKLGv5BckBIYRJk81s5 79UJ3/yx59H0JT/1tUseznBGKuTe9IQ= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1622096544; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=hl0khCFoLI0oRhRpVSDBmDjEyhT/A0eO1VQGtupP81w=; b=Q+35HxqAyk8iXept8b9IbPaapf1vAqqHC4gcCPpccJ7IyfydtYPf1hxGPqEKelUmPsigNv QHtDLICCvLEHR2AQ== Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id B02E3AC46; Thu, 27 May 2021 06:22:24 +0000 (UTC) Date: Thu, 27 May 2021 08:22:24 +0200 Message-ID: From: Takashi Iwai To: Dmitry Osipenko Cc: Dmitry Torokhov , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH] Input: elants_i2c - Fix NULL dereference at probing In-Reply-To: References: <20210526194301.28780-1-tiwai@suse.de> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/25.3 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 26 May 2021 22:44:59 +0200, Dmitry Osipenko wrote: > > Hello all, > > 26.05.2021 23:19, Dmitry Torokhov пишет: > > Hi Takashi, > > > > On Wed, May 26, 2021 at 09:43:01PM +0200, Takashi Iwai wrote: > >> The recent change in elants_i2c driver to support more chips > >> introduced a regression leading to Oops at probing. The driver reads > >> id->driver_data, but the id may be NULL depending on the device type > >> the driver gets bound. > >> > >> Add a NULL check and falls back to the default EKTH3500. > > > > Thank you for the patch. I think my preference would be to switch to > > device_get_match_data() and annotate the rest of the match tables with > > proper controller types. > > Doesn't a NULL mean that elants_i2c_id[] table fails to match the ACPI > device name? What is the name then? I don't own the device, so we need to ask on (open)SUSE Bugzilla. > This could be two patches: > 1 - trivial fix that can be backported easily > 2 - switch to device_get_match_data() I guess 2 is easy enough to backport to 5.12.x. Let's see. thanks, Takashi