From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.10]) (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 E6FA624503B; Fri, 8 May 2026 04:44:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.10 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778215489; cv=none; b=cFR49XOkYvx0QieiKn28i2vnxd+nLz3f/lQIHmq9r/opIaXuQ7GZzZ+jefXQtA9bKLxdOWOfd6oPHHA+uRyiktbfyfeChkBM9v38QNftYyQgayLhgK5ukQwoScx65KOq8ofUZYdA6KPlOeYT3RwvU4pJ7ikn1tc18FkK3c+fy/Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778215489; c=relaxed/simple; bh=WVcZmcrMUcQSLgmbj20gn3L9v+Hk/LfU1kizlZqcX4s=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=dLbMP5Yv5B5mDTT8+7NMHc1LsR5wynhjKP6+q7flc8dLn/7LCzdwY9od9+lGpD6RFxlBxkhoK0zvv1r7GFg1RZu4hFB950GoMen8ECocB8P3J8Sxg1CDi6IU6MLa8Z5i3q/G3I/3rMOP69qCkuX9UrZqTrJt+HwAPe8gElDpFKA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=K02TKGZt; arc=none smtp.client-ip=192.198.163.10 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="K02TKGZt" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1778215488; x=1809751488; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=WVcZmcrMUcQSLgmbj20gn3L9v+Hk/LfU1kizlZqcX4s=; b=K02TKGZth7UhOWWBc3o0arQ6/ncnd4HYIHMM5AZ2nVhs2jUATXJ+M2zw znDcM0o3Nq+iE7JJMjyUrfs07frt8BlD4lqB4qHq4VOF7Th+Kevs7Rqux yhQZVoZDkXPxeeUu9zsudMknMq+7+oXPRkxeRaqPGxPVrasRQlciu6ztZ 6IiM2PI8MSXzdrOZ10C9zokdjDnPbxGeB8ZRwpEIVUECt6gdegR/VFVac Ryk+UM+qsg40jGudXvklcOdWlTjkC5SokjoMyFvETKFifOuTx1XPACT3z wSrBaO3azuNUZh9BUnNNd80gtBw2xjSDBKYUQ3/FWbuOuAeUh6LSun5nm Q==; X-CSE-ConnectionGUID: VPTQXlkGT9yIvieho3H3gg== X-CSE-MsgGUID: eJG3IhviQt6y5UoV8Dmjvw== X-IronPort-AV: E=McAfee;i="6800,10657,11779"; a="90558477" X-IronPort-AV: E=Sophos;i="6.23,222,1770624000"; d="scan'208";a="90558477" Received: from fmviesa010.fm.intel.com ([10.60.135.150]) by fmvoesa104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 May 2026 21:44:47 -0700 X-CSE-ConnectionGUID: qEVbJLo2RyKB63FiqhsKMw== X-CSE-MsgGUID: ua4RiqMJQ1O91HqbJZ0jlw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.23,222,1770624000"; d="scan'208";a="232309852" Received: from ijarvine-mobl1.ger.corp.intel.com (HELO localhost) ([10.245.245.237]) by fmviesa010-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 May 2026 21:44:42 -0700 Date: Fri, 8 May 2026 07:44:39 +0300 From: Andy Shevchenko To: Jonathan Cameron Cc: "Sabau, Radu bogdan" , Lars-Peter Clausen , "Hennerich, Michael" , David Lechner , "Sa, Nuno" , Andy Shevchenko , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= , Liam Girdwood , Mark Brown , Linus Walleij , Bartosz Golaszewski , Philipp Zabel , Jonathan Corbet , Shuah Khan , "linux-iio@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-pwm@vger.kernel.org" , "linux-gpio@vger.kernel.org" , "linux-doc@vger.kernel.org" Subject: Re: [PATCH v9 2/6] iio: adc: ad4691: add initial driver for AD4691 family Message-ID: References: <20260430-ad4692-multichannel-sar-adc-driver-v9-0-33e439e4fb87@analog.com> <20260430-ad4692-multichannel-sar-adc-driver-v9-2-33e439e4fb87@analog.com> <20260507151549.61e4e8fb@jic23-huawei> Precedence: bulk X-Mailing-List: linux-doc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260507151549.61e4e8fb@jic23-huawei> Organization: Intel Finland Oy - BIC 0357606-4 - c/o Alberga Business Park, 6 krs, Bertel Jungin Aukio 5, 02600 Espoo On Thu, May 07, 2026 at 03:15:49PM +0100, Jonathan Cameron wrote: > On Thu, 7 May 2026 09:26:00 +0000 > "Sabau, Radu bogdan" wrote: ... > > > + st->info = spi_get_device_match_data(spi); > > > > "Is it possible for st->info to be NULL here? > > If the driver is manually bound to a device with a non-matching name using > > the sysfs bind interface in combination with driver_override, > > spi_get_device_match_data() could return NULL, which would cause a NULL > > pointer dereference later in the probe sequence." > > > > Agreed, will add the NULL check with -ENODEV immediately after > > spi_get_device_match_data(). > > Andy, you seeing this one? Looks like we are putting these checks back in again. > Whilst anyone forcing a bind like this is onto a looser anyway we shouldn't > crash due to a null dereference. We should find a way how to disable that combination from the start. The driver makes no sense to be instantiated from user space. Actually most of the drivers nowadays should not be bound to the devices without driver data. -- With Best Regards, Andy Shevchenko