Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2652952pxj; Mon, 31 May 2021 07:27:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzVedpGK15XCpv134D8EunrxtSJ8nIJAunuZHA8d9xvkMo33buvKzoMzLbcpwb3pBMKueSa X-Received: by 2002:a05:6638:a48:: with SMTP id 8mr21234506jap.38.1622471256841; Mon, 31 May 2021 07:27:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622471256; cv=none; d=google.com; s=arc-20160816; b=p2sbZMsUJOSdDgGR3qK/s7Jjmzr/+1JGxqCfLBiR5G+owsmG6JdipI7H5qs956FKnR /Qq+bSSjTJY1SCHfO/iBtPmYZxHFDqp0LLMrlFEWcE2+PDavi2di2YuVqrr3kkOzzfYS BJZy7RdJki4OlJ25GHlU6hJeMl/aiFfzOXqmwNFgdHDhvyqq4EgEnA+9Y2EyJ6ZHO8+G LADmSc6Lk0fspM0RMKZnU1uZKZxPRzZd8t+bVeQ9x8hBQD53beRWJKt9G3cGPHrhHk3w MAlrYM6EGqrnWeart+cIgAIwsl3THpBvYYDUiIgs+lmX2LbMHw4HtHOanxIfCgkKhjiq Cj4Q== 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=x4XeQ6ypL+X47UB5Gvt6inbLUwkxjLOLZouCENXv3t8=; b=SAbIVoz+7FxpUVTdZDyXVSuOdCx5bAvCd92vv7xvG+iKV8zIHe13NXQuXF1q9AfHwm msBzfGEOcgRfLjRbNlLc/Q83R4TXMpEHcNapRqkj6XQdCNHeffb7yGuyVbxZZHEpMH19 UngQ0VCrqzN7ApRVRIehBOPBlVYturpZxrzb7YqGeJuqWDsMEo3gFTrQsjdi6xcyB3HU 3y//Yq4kUikJxhYHj9vFB4ymaVcBbDSSxoYS4dGSFTDh5dbhwHnoAfAR6+SZHDm/avXD z1hjSAg01qMugmA4oDiTa1y0wug/Yx+ZA0j1RrNcRP9ualp7039Fj6NQ4mXZ8+Afc2m/ xhHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=X+2d52rc; 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 y10si13873939jaf.62.2021.05.31.07.27.23; Mon, 31 May 2021 07:27:36 -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=X+2d52rc; 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 S231960AbhEaO2X (ORCPT + 99 others); Mon, 31 May 2021 10:28:23 -0400 Received: from mail.kernel.org ([198.145.29.99]:55704 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232618AbhEaNw2 (ORCPT ); Mon, 31 May 2021 09:52:28 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 62B186108D; Mon, 31 May 2021 13:32:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1622467967; bh=fXVmRXjEYXzSiN1Fw+5ymuglW2HubZD3PlHAZd4Xgv4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=X+2d52rclrXttzCg3YQ2e6KLNc05ALTgESbLhIo0ewvueaRihg6gVPQ0kBIqrbrZX qGQ0qEAa2+BVTUlqCtwcAERRUQgt5aLp5qDrHJYK6T9zKolY2j4mCO1We3gS+04DsB hcYpGLsi0bjrsRAywgWpW/dhh6+aGMdyyDyIzi6Q= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, YueHaibing , Stable@vger.kernel.org, Jonathan Cameron Subject: [PATCH 5.10 067/252] iio: adc: ad7793: Add missing error code in ad7793_setup() Date: Mon, 31 May 2021 15:12:12 +0200 Message-Id: <20210531130700.262926527@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210531130657.971257589@linuxfoundation.org> References: <20210531130657.971257589@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: YueHaibing commit 4ed243b1da169bcbc1ec5507867e56250c5f1ff9 upstream. Set error code while device ID query failed. Fixes: 88bc30548aae ("IIO: ADC: New driver for AD7792/AD7793 3 Channel SPI ADC") Signed-off-by: YueHaibing Cc: Signed-off-by: Jonathan Cameron Signed-off-by: Greg Kroah-Hartman --- drivers/iio/adc/ad7793.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/iio/adc/ad7793.c +++ b/drivers/iio/adc/ad7793.c @@ -279,6 +279,7 @@ static int ad7793_setup(struct iio_dev * id &= AD7793_ID_MASK; if (id != st->chip_info->id) { + ret = -ENODEV; dev_err(&st->sd.spi->dev, "device ID query failed\n"); goto out; }