Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp3472616pxb; Mon, 30 Aug 2021 03:11:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzZcJvyOtHCPtPCb9h2ohoftVVfGfWDXHblB3poFn1uJKCzGV6oXTpEaGLhSrmh3AJVsIV/ X-Received: by 2002:a17:907:169f:: with SMTP id hc31mr23842694ejc.328.1630318270423; Mon, 30 Aug 2021 03:11:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630318270; cv=none; d=google.com; s=arc-20160816; b=yEAjc9sbMrsRgvHty+z3osDKKD1gAZifRk+WGC5QwBQfVJwYUIZfp1xXRbRMQLZHOM qrFfO0MIdI1RWL3rb6MKHpqgLcxY89C5iMJSa6+3JXwBVTjiYLL/DB0vQ7B46PkqEvV7 Ny0X0v1PHebuT/xuqCCPG834IJhg1hmIgtOZyugFhdLWy4hv8oW2uVs+0BiduuIp2a3l rcgU5iYFARbhofGD8aKvq4H66bD+ju+PRiQCNjtIx462XTn+rltv3+6RBpRsH7XS4ut6 lK2l14497iwUB/VIvJS7g2P/BtC8e79CkbG2gQm1C6Y/BoAwPmALxHPGO8+dh5JdUDL6 5kAA== 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 :references:in-reply-to:message-id:subject:cc:to:from:date; bh=86jg7U9cclydxNnH3Kd6Pz7HyORJGoADNTNZpgboGnE=; b=bwRulQl7hXUnLPCYz9UEQ/3DSJLrRdJjxdHbd3xrrmLAphc1hXCzBWb1NMyszOb0SO WG9F4yqfEbZi+CMAI0P3wMq8vyklgR6CV3BhvIz6dXU+daLrRI9cVzZ023tW272jPjXj pALIM090058/Wqjwcb9WShJnipuXAERRzfWbKIRiLabZ7kd/7VoMi6lPzDXYgZyKx6rQ NnLxyjcrg9FOLsxbt8WhD2AbrAXlnWMU2Yf5UzJuhYT4NcSvxmTPN9DL5Fp9Q6cEMRMP T2mcbJAGeizSJu+hhs+nV/g1o9uEFHbdyJbjYW3tpa6B8zW+ASqU58bTeTT1wMTtId+r a1rw== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v30si4399115ejk.697.2021.08.30.03.10.47; Mon, 30 Aug 2021 03:11:10 -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; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235963AbhH3KKW (ORCPT + 99 others); Mon, 30 Aug 2021 06:10:22 -0400 Received: from mail.kernel.org ([198.145.29.99]:53998 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230194AbhH3KKV (ORCPT ); Mon, 30 Aug 2021 06:10:21 -0400 Received: from jic23-huawei (cpc108967-cmbg20-2-0-cust86.5-4.cable.virginm.net [81.101.6.87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 64D49610A2; Mon, 30 Aug 2021 10:09:26 +0000 (UTC) Date: Mon, 30 Aug 2021 11:12:38 +0100 From: Jonathan Cameron To: Miquel Raynal Cc: Lars-Peter Clausen , Thomas Petazzoni , linux-iio@vger.kernel.org, Subject: Re: [PATCH 05/16] iio: adc: max1027: Drop extra warning message Message-ID: <20210830111217.02de96e4@jic23-huawei> In-Reply-To: <20210818111139.330636-6-miquel.raynal@bootlin.com> References: <20210818111139.330636-1-miquel.raynal@bootlin.com> <20210818111139.330636-6-miquel.raynal@bootlin.com> X-Mailer: Claws Mail 4.0.0 (GTK+ 3.24.30; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 18 Aug 2021 13:11:28 +0200 Miquel Raynal wrote: > Memory allocation errors automatically trigger the right logs, no need > to have our own. > > Signed-off-by: Miquel Raynal > --- > drivers/iio/adc/max1027.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/drivers/iio/adc/max1027.c b/drivers/iio/adc/max1027.c > index d79dabf20567..ac603b4ca787 100644 > --- a/drivers/iio/adc/max1027.c > +++ b/drivers/iio/adc/max1027.c > @@ -461,10 +461,8 @@ static int max1027_probe(struct spi_device *spi) > st->buffer = devm_kmalloc_array(&indio_dev->dev, > indio_dev->num_channels, 2, > GFP_KERNEL); > - if (st->buffer == NULL) { > - dev_err(&indio_dev->dev, "Can't allocate buffer\n"); > + if (!st->buffer) Don't change the form of the check. Whilst it doesn't matter in general which of these is used (and I actually prefer the one you end up with) this change makes this case inconsistent with the style elsewhere in the driver. If you want to clean these all up then I don't mind that, but please do the lot in one patch doing just that. Thanks, Jonathan > return -ENOMEM; > - } > > if (spi->irq) { > ret = devm_iio_triggered_buffer_setup(&spi->dev, indio_dev,