Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp360156pxb; Wed, 18 Aug 2021 04:15:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyygXytqHfBZaRgzsx3CCOEnPrtgUUFZ8ueJB5s04t9+2u0ARMuP/dlt8JbsHu5gJljYJtE X-Received: by 2002:a05:6402:160a:: with SMTP id f10mr9735264edv.355.1629285304133; Wed, 18 Aug 2021 04:15:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629285304; cv=none; d=google.com; s=arc-20160816; b=rVgT1Q4ax2ESPUVaNKlh9Q3R6vdhHW6SEymkGsNiSCoZi7UEXigmeZs41yHE+Mrnns pIZoMECdKmmKc5lsRHdR7GdMx8ampZHQtaUHoLHmelfhbL+RRSDfT1lL8FoikQpX5jqx 2TlDOK9/4CE3/gP6omiwHDJdh3synfq0h+duHBoDaowPQOjY5AApxkJwqVrj0uNJ/92f j1Teyn5g8BoJ6eXmx7WYlH+JQoKJy/G6EYsN5u7MaFQv8gv0VTPWFcPmpwO8EiYujkgG 83rFbQkIacRlz96HCC0h2phUyrN/+795twpg0W8uPFTs/yj6qPGKRvOUoSSmuqaAZVsA xp1w== 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:date:subject:cc:to:from; bh=vuzwbYZ5Vg54bUc7C2BGGP5h/HNocZUMlLErZ+6UXfk=; b=x1/KHs/ZWPQpi8nuyOGEp2vM8E0gjO7C8/F9VIi1Ut31IAHRwCGY8bqJo3b8mwdiWx xzPJL7jrEEoK0aLcgeRCp45OhWrjyz+OhsDd/KDus0JoLpqmGHgmAxI28vL66tDDO7Yu Gm80oC1uyNSYTHT/FFuEUDi/jYtf72XF1EoCLPtz8ytrx0MNTXZG2LyT2YndT5miw4Oa MNAuIHSRjV2Bh1AHDDNlTPQYw20AVLFPYwqefbJ4cHKXShvtS3QhSAkhzz6O7uVql+Jo uOxxPQYF+4nC3eFykgv1zU4FwMbKQQLrMGUciVLO5gRyK6XqErpvZkOqnxdHu6DDSFUz Yzig== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l3si5843384ejo.634.2021.08.18.04.14.41; Wed, 18 Aug 2021 04:15:04 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235875AbhHRLMn (ORCPT + 99 others); Wed, 18 Aug 2021 07:12:43 -0400 Received: from relay3-d.mail.gandi.net ([217.70.183.195]:36135 "EHLO relay3-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235405AbhHRLMT (ORCPT ); Wed, 18 Aug 2021 07:12:19 -0400 Received: (Authenticated sender: miquel.raynal@bootlin.com) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 583D260003; Wed, 18 Aug 2021 11:11:43 +0000 (UTC) From: Miquel Raynal To: Jonathan Cameron , Lars-Peter Clausen Cc: Thomas Petazzoni , linux-iio@vger.kernel.org, , Miquel Raynal Subject: [PATCH 05/16] iio: adc: max1027: Drop extra warning message Date: Wed, 18 Aug 2021 13:11:28 +0200 Message-Id: <20210818111139.330636-6-miquel.raynal@bootlin.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210818111139.330636-1-miquel.raynal@bootlin.com> References: <20210818111139.330636-1-miquel.raynal@bootlin.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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) return -ENOMEM; - } if (spi->irq) { ret = devm_iio_triggered_buffer_setup(&spi->dev, indio_dev, -- 2.27.0