Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp3030494pxb; Mon, 18 Oct 2021 06:57:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzBEHqFYLYSvsjMNHLfRpF8hRQ5XQDsdIRoBuAmwNe2/KRoymsB7rYTgt5FWSk/CAiszFLy X-Received: by 2002:a63:2acb:: with SMTP id q194mr1409957pgq.384.1634565471202; Mon, 18 Oct 2021 06:57:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634565471; cv=none; d=google.com; s=arc-20160816; b=uhdUxwxQb4QXafw92RrctzoadMwi7eW2dW7t56tg8bq6Y9qhW1sL06ONlMji0CMHpb ieb6tk+iVwJ1QvHraiQKzlC5JHV3TMl6Z4aBQNBg5Q0TlmYgdYHrio9SlAQU3vkxNNpR ghHOvvf8YtScca6AN/AlGHoDlVxfxA7YXQ9kuDeThQALza0rk3vMzYtB1+ov39HVNTiN ZW9TtzsVwrAMVbTV28pDSpjKu3zYOVNOH4RlU3OfLVpxoreU81uGKVhcyYVt+PQfRNKR ztAOHlbTZh14OsmSWEuSlD+f/IuNyn0kM4M6CR6mpZHkBx+n7V6BB/ZabFIGyC80cJFs XzOA== 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:message-id:date:subject:cc:to :from:dkim-signature; bh=EK75F/4tQQhBb7DHeFbm4//lZcS3wA1dgw9R3dk28Yk=; b=uHOR/oWFxObDtl2cwWnWYL9VeBGSYNFyQvoA2Yffkkb3TybW+lLrMNSLsmR5xoqim5 ra1er32gJ/CsunOwWpYv/E2iUnvLw/9L5p9LJg9GYxNdFqsxJFie5XQVFEzMSq14UbLr lvTgH4wM8IBbsfhhThwlt320bFhsEt6/BJFw2aVnMqDybg5qPZ67hqzK+hGAXyQM5UBW EHBKFFqVMtCsvUtYaV6GsXFAq9+Cb3Z/g7pqXvqefJFJcEc7pRFLsDenzmbtdo+lmSNe d7vG93lYq1VfsvYiL9ZyYV9gqCWzknExZqpE0/bBVUL+5PKd7XZ1GKxYMWDtgG34DnB4 XlNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=y81LCEA6; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j28si200089pgl.0.2021.10.18.06.57.37; Mon, 18 Oct 2021 06:57:51 -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=@linuxfoundation.org header.s=korg header.b=y81LCEA6; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233674AbhJRN6x (ORCPT + 99 others); Mon, 18 Oct 2021 09:58:53 -0400 Received: from mail.kernel.org ([198.145.29.99]:59060 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234474AbhJRN4T (ORCPT ); Mon, 18 Oct 2021 09:56:19 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8222761A07; Mon, 18 Oct 2021 13:40:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1634564428; bh=fwWc1vHc++P7U8++KRpjhEkjrQAy4ulOHvPESQ1xhfw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=y81LCEA6RAuFm6f/IX599cR4aKiaG296Ao0W0rBahl8aUG6sMQuOe7I9LzJXcTcHq 1+513bCrZdY67ITMiSisz2+v08LFrLIYcnmPf5SaCnrCLoZ7oBuS835pDfLl9Ohoct GsuQIfI9J7X7hWQ/Le5H76IG0/XKO4iz10BPIIMY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dan Carpenter , Jonathan Cameron Subject: [PATCH 5.14 086/151] iio: dac: ti-dac5571: fix an error code in probe() Date: Mon, 18 Oct 2021 15:24:25 +0200 Message-Id: <20211018132343.488553361@linuxfoundation.org> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211018132340.682786018@linuxfoundation.org> References: <20211018132340.682786018@linuxfoundation.org> User-Agent: quilt/0.66 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 From: Dan Carpenter commit f7a28df7db84eb3410e9eca37832efa5aed93338 upstream. If we have an unexpected number of channels then return -EINVAL instead of returning success. Fixes: df38a4a72a3b ("iio: dac: add TI DAC5571 family support") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/20210816183954.GB2068@kili Signed-off-by: Jonathan Cameron Signed-off-by: Greg Kroah-Hartman --- drivers/iio/dac/ti-dac5571.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/iio/dac/ti-dac5571.c +++ b/drivers/iio/dac/ti-dac5571.c @@ -350,6 +350,7 @@ static int dac5571_probe(struct i2c_clie data->dac5571_pwrdwn = dac5571_pwrdwn_quad; break; default: + ret = -EINVAL; goto err; }