Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp3015175pxb; Mon, 18 Oct 2021 06:38:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzbvpiyWeorx+4D7cSgB3PMPLCbZ78ozXQFTHw8e8cBRCJXfQ0LIUdn5FXhhpoYS7Iludou X-Received: by 2002:a63:b007:: with SMTP id h7mr23421580pgf.443.1634564327496; Mon, 18 Oct 2021 06:38:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634564327; cv=none; d=google.com; s=arc-20160816; b=jT4D2HGTTiptxRfB0zHGhzVz9wpP8IqFnKSwIaRljz/ovbZQGeX4bZ87xbg/DC4SLB iQttwLydhzM4v6bEYjhR6vyzloIyjXHkmfGj/OsvL32Jxw2lSKZ5ei6rEWBjGiXdn5XS npBX+rphtvHVTA66F3yxtmE5nREhcJuGArYYkPN/cIerfBvSULqpL0MBf9JWy8ILdjb0 z5q2JM45ABzJIZd7Pypn5Ye1fxz/GHA0Eu2vphw8UxCGUwF3g5RXFqb+xCPQR8M3+Kqr sKNW/ap/t8urQKKj80SUMfChNLp/3ZsFti0cxjnCIEZqQxrUJJWVHavLpEWGZv/UqLiD IpVw== 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=jmJ6RmsT8miTlvgyjU1iSkW+HfyRf426p7jXah/D4RM=; b=vo004m8K6jqSk8Yihq3KJRKjKbEPDbW2TsZ2XRhEc41Z54BXvR2Ig8DPKjIN1j71tt hq2GGZU2F5VRq18NxnJbEShF5FYVFwy5jFl8BIPxFZweJZeuWOrpPyt073uJUyjNhG42 ZKoq79Bro+3dVOUPRvACWLfH1djZJPYiP6nkcB31UTNQjD4N96ml1CsQj/kMidU2/6RJ b3aqs5WzX7kPcOrV7yQEIQQ4LyShppZhEHiCm7UUkA93uLwmEtd9X8I4EHQKhr0xszPm JdKJL1vDyfNo260S1bmHjwF+be94paDDu5n5zEJXUw83O7DcU4eLcFA4dR8Js6PMGUEF GZ4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=PqPhdNNe; 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 b5si11099093pls.256.2021.10.18.06.38.33; Mon, 18 Oct 2021 06:38:47 -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=PqPhdNNe; 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 S232682AbhJRNjQ (ORCPT + 99 others); Mon, 18 Oct 2021 09:39:16 -0400 Received: from mail.kernel.org ([198.145.29.99]:52546 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233000AbhJRNgT (ORCPT ); Mon, 18 Oct 2021 09:36:19 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id CFDD1613B5; Mon, 18 Oct 2021 13:31:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1634563867; bh=o3SKVBWmzwExcDiq6bU4iIj+Ih/BOWbR68HrqV6HN28=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PqPhdNNepw4QCibbuFLo5VHI3zOrl35B6eOyOdTPCBP/cw/9IjvvWRcjXymJGcX/x L481VEcZULUTprlRbUMyockYzZswT5/vx8h1U+jPx8bMCED4UCN/o5khTtZvsGMqDx +mhT6J9pRIC5gEIW/wvz+DftcfMPulG+gMmeCmaw= 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.4 44/69] iio: dac: ti-dac5571: fix an error code in probe() Date: Mon, 18 Oct 2021 15:24:42 +0200 Message-Id: <20211018132330.933098725@linuxfoundation.org> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211018132329.453964125@linuxfoundation.org> References: <20211018132329.453964125@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 @@ -352,6 +352,7 @@ static int dac5571_probe(struct i2c_clie data->dac5571_pwrdwn = dac5571_pwrdwn_quad; break; default: + ret = -EINVAL; goto err; }