From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-oi1-f171.google.com (mail-oi1-f171.google.com [209.85.167.171]) (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 D5FBA369D42 for ; Tue, 16 Jun 2026 14:04:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.171 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781618656; cv=none; b=uehUWd6Ys8GD4ua1G4aMNpVGNLBDFo+XRLjnOWIhPRWiJC2GszecJ/X24L9QgQ669g9ZZOr9VS82F3PImE3mAXPaYARIRNuAG11QSqG+3DvK5UdtHwlSL8IzjLKMzlsrLqSowzAiYDdOGB2Ek9icgWqa9Lit92jzXXcDPCWsKGA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781618656; c=relaxed/simple; bh=aHRpwy+EAF3xTCyfACBtdq+MbNPIl2cnmy723dQYE8g=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=qnHx6d3Bn3S873ha1SkwZ9yR+Fiz4+9n5Qg8lt08wDdxDNjskaRc3rAenqEkow6XYNCq+CEFHDkVjG8ulel0ijLmRdbFgaxBCY/tcCxtD60eA3yN3uyYd6X8J0AOH6dMYA5mCqyM1GbODaLfRwi0FQP/RY34izF9kRpT3FfXObQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com; spf=pass smtp.mailfrom=baylibre.com; dkim=pass (2048-bit key) header.d=baylibre.com header.i=@baylibre.com header.b=Y3LzmORL; arc=none smtp.client-ip=209.85.167.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre.com header.i=@baylibre.com header.b="Y3LzmORL" Received: by mail-oi1-f171.google.com with SMTP id 5614622812f47-4866834f8deso1762966b6e.2 for ; Tue, 16 Jun 2026 07:04:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre.com; s=google; t=1781618652; x=1782223452; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=Xr4xaFxz+eK1eveJR03WaFSuuQiuLngSW1aqKxuBcYE=; b=Y3LzmORLSb2wv3e5zgwWNlSKlTzDwai9o1A2Z0PdrVBcfMpcL5VkFuTcarULEvkIZr OFvveS1H95g7EWs5IZ+ICojuBt0QP09T70I2axyY28i+48K2kWibu2RskKtcAWodLYwK pdSkT3a8NkxtsYicavEpteOWmqNa7LwCphl2edYce/SPQLAIEZBqDP8PzvQmavz6k7RT clcL65p0E9+8gF77x0mg5ew360B8fnqWHYS2iURr6rxS4hRAUkWIypy61Y51dEKtqf3+ S2kWV5wE8UaJ/+1S5QBbS8RZzDm/3yTvky6GchgwgrYH5DB9ruHm+3EGozh7jXVILF4C dFWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781618652; x=1782223452; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Xr4xaFxz+eK1eveJR03WaFSuuQiuLngSW1aqKxuBcYE=; b=Z126qApNcHchMURAs4uAOmVukHtdbbQQsJVdSwB92VTPoRFF5LVo1qPQiJPqrtpss4 ZImGuc+yCYexzYtxS/YA91P865jUwJbTQn4asUdhV6jm3OuI1E/fhHUwzebuT0fSQneK DQfBecTRYO4V770uljaASTf5Pz2hkFsyvkOhZQUFvmKo5p0xS3UwISRpR8MuXxxSXfif eHP1/B1GG7hwMJ0L5rD6TDfPWRofGWTkh2jHmN9uiTEDWkrV707TnSV5VhmX9KESi42n +bFXa+My1VOjdO4JFDgtBqgoeSlXrkW8yjeS6mtwaIrcUeZJA4CZJfrB8FvRQWDY+FTA zT9w== X-Forwarded-Encrypted: i=1; AFNElJ9mMCZBIQheJHwK0op1QNvFvQAyu7/sDArT5/hVnNBJDBxohCaPaRHkMbUKhKqGunR/1s0WJ7Mbt0mG+vU=@vger.kernel.org X-Gm-Message-State: AOJu0Yxs3KnBzI7ulden0sUt+9+giR8HhwrWRYBzzEnGp+b6UU+9P2nO FoodBU83zUh/1YEmet9ZVUpzfbeP6zzBFS08IE8cyEHJ5Dx7uv199++DOOryFFradJI= X-Gm-Gg: Acq92OEh84lOuRP68+Sk14DF2Yixx6cFnPi8cCmeB7SMY4WSA+cfUJo5KKrfvzdTQ+X qoUPgAgLab/HM7fIW9EKZi2KKMysDd4WeUfNM9RoAOa0s5LFDNQh7nn5RrDnZ40jqxHnmL+mdJi fP3KK4NeGIlvI0j/g/SY+pznnyTsRtjtd+ob05FtBm08CoqZAjsDKUTRlEPuFrY6TWJkcuj5QoY smXpPD5UVD1XUrJAZUzW6imQUK8/OxrcTRva2B80qts91Y6Ll5uR4+3f56xIHxzPfovAAwwJjUu 9uuOFq7a8rzH7IVv2JuDfq66N8KcPE8m1peGfLoDsbmoCxNGfUY73GD8uO0o+9H4WZa8PMCqgxx z+cQyCzVGuQR1lufLA/R8s5dUEMov9r4RJoL8otix8DF1kVyeDHL7cJlVJiL3DWXG8sINPDUr3Y MysEq0XhJfYydqXVTO9oGozQjy56c2yym6h7IwCmTkoNBD/meoyYdo0Z16By3URwHOsK1+kismd 0PXXnkByhbW X-Received: by 2002:a05:6808:30a6:b0:486:89d8:6d57 with SMTP id 5614622812f47-4872f353fc2mr12652737b6e.8.1781618616673; Tue, 16 Jun 2026 07:03:36 -0700 (PDT) Received: from ?IPV6:2600:8803:e7e4:500:16b0:5133:47b1:a939? ([2600:8803:e7e4:500:16b0:5133:47b1:a939]) by smtp.gmail.com with ESMTPSA id 5614622812f47-4875dfb4574sm4543917b6e.16.2026.06.16.07.03.35 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 16 Jun 2026 07:03:35 -0700 (PDT) Message-ID: Date: Tue, 16 Jun 2026 09:03:35 -0500 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] iio: adc: ti-adc*: use dev_err_probe for probe time errors To: Prashant Rahul , Jonathan Cameron , linux-iio@vger.kernel.org Cc: Shuah Khan , =?UTF-8?Q?Nuno_S=C3=A1?= , Andy Shevchenko , Matti Vaittinen , Petr Mladek , Oleg Nesterov , Sebastian Andrzej Siewior , =?UTF-8?Q?Uwe_Kleine-K=C3=B6nig_=28The_Capable_Hub=29?= , John Ogness , Dixit Parmar , linux-kernel@vger.kernel.org References: <20260616130612.73122-1-prashantrahul23@gmail.com> Content-Language: en-US From: David Lechner In-Reply-To: <20260616130612.73122-1-prashantrahul23@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 6/16/26 8:05 AM, Prashant Rahul wrote: > This simplifies error handling and ensures consistent error reporting. > Also add missing error messages in a few probe paths where failures were > previously returned without any diagnostics. > > Signed-off-by: Prashant Rahul > --- > drivers/iio/adc/ti-adc081c.c | 10 ++++------ > drivers/iio/adc/ti-adc0832.c | 6 +++--- > drivers/iio/adc/ti-adc084s021.c | 3 +-- > drivers/iio/adc/ti-adc108s102.c | 2 +- > drivers/iio/adc/ti-adc128s052.c | 2 +- > drivers/iio/adc/ti-adc161s626.c | 6 +++--- > 6 files changed, 13 insertions(+), 16 deletions(-) Please make one patch per file. > > diff --git a/drivers/iio/adc/ti-adc081c.c b/drivers/iio/adc/ti-adc081c.c > index 33f82bdfeb94..f6ce23975b80 100644 > --- a/drivers/iio/adc/ti-adc081c.c > +++ b/drivers/iio/adc/ti-adc081c.c > @@ -174,26 +174,24 @@ static int adc081c_probe(struct i2c_client *client) > > err = regulator_enable(adc->ref); > if (err < 0) > - return err; > + return dev_err_probe(&client->dev, err, "failed to enable regulator\n"); > > err = devm_add_action_or_reset(&client->dev, adc081c_reg_disable, > adc->ref); > if (err) > - return err; > + return dev_err_probe(&client->dev, err, "failed to register cleanup action\n"); Please don't add new error messages. If there is a really good reason to, please do that in a separate patch with a justification as to why it is needed. In this particular case, the only error is -ENOMEM, which we never have an error message for. Above, for regulator_enable(), an error is already printed in many cases when it fails, so needing to add an additional error message is questionable. The same comments apply to the rest of the changes as well. Unless you actually hit one of these errors and found it difficult to troubleshoot without an additional message, then it probably isn't an improvement.