Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2699598pxj; Mon, 31 May 2021 08:33:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx8B+M57yQV97Ngn/ZKab1/+jJVc7zTj4hKWKQ/tBizX3sMGGwQ0PTj1DeHH3tx1ai+o+bm X-Received: by 2002:aa7:db93:: with SMTP id u19mr26465775edt.227.1622475185394; Mon, 31 May 2021 08:33:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622475185; cv=none; d=google.com; s=arc-20160816; b=SNbbYv9zxJeCGydwIkuJii0+hBGO3MA16GEQ2hGsF9pu8GOuswmLqgJjnJIdRH9R67 att7G1SwXi59prkhXnHbQBtReaMxJTJFIxEoAUEzkwT/08f+U4p5oTAT280m+pqdnivI zOgdw9xeX/V6LCtTJoxP/cmj26Fe4B1yb3k6n8tMrw0J87jJxZhlJq9n2R8c2LQ/l68j YJbEj7R515QweNZjUx+8Bm1I4rz6Nx8NB0BTBz9BSzaVck+PuzTYl/wa+rVKkyb+6MLV 23io/aaaPDR/jBstmNWUwG1GhqoFMPQbXRXG0VCxO0vLmb3/eQCA3soUbx637a7cgGHA nTmQ== 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=VcuuJSIzGbi8+XVWYfM01Rej88d+f2ZtlbrKJ8XDFAo=; b=JZATXUNsEcAC7ZMwtmhILV/w/d5o0smIM5UzfvMRhXJu4feuT6kkRU1UEkhPTPTZgE Wu4Poz4t77z0P+yt6IRTD4pIAwPYC67OY8fdlD3N0PdRiRHwXoZRwY0h5KbLZiL4sxBV lCn37S7FuQiL3d7KvyV5cXNdWx38TB8KMbxB+2baDF6XftyWwK9tuMq3UPXDDA9FiYzt JCadAOFlabqtw0IcOEMgi9GHtWho3qAnkP5T+j12EKlOts3NgRcKfG+2iGT6ddGQvTNr 0mkHwau/oeMuS0UrFp+IGFf6VVryYk4nyvqA66tvLrAilE6491H/UtTCg5xewIMRowEv I2xQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=YYsrImr7; 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 e22si2886014edv.165.2021.05.31.08.32.42; Mon, 31 May 2021 08:33:05 -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=YYsrImr7; 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 S233033AbhEaPal (ORCPT + 99 others); Mon, 31 May 2021 11:30:41 -0400 Received: from mail.kernel.org ([198.145.29.99]:43312 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232848AbhEaORn (ORCPT ); Mon, 31 May 2021 10:17:43 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id BB5F9619B0; Mon, 31 May 2021 13:43:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1622468631; bh=hGubpCKZPgrK5s3MemOHKJXhP02/GL9Hd5ohu+KxcPk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YYsrImr7kLv0LsMhVWEzuy+THnY3UW6p7om/1udjMqDgEmqDH/JsUNNviaIqmEwm7 dRZz6f1woKvBu5zHI8vqiAhHbBtKdPjpWLKq5slaBrFp8vfkeOmBnvxl2LQjD/A9yi FqXuXWXvcZAHR1rOYLTqTRoBA2FUHePU0FnKKkrQ= 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.4 048/177] iio: adc: ad7793: Add missing error code in ad7793_setup() Date: Mon, 31 May 2021 15:13:25 +0200 Message-Id: <20210531130649.582445660@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210531130647.887605866@linuxfoundation.org> References: <20210531130647.887605866@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 @@ -278,6 +278,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; }