Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2727049pxj; Mon, 31 May 2021 09:12:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyaVKidQzDG5V6NugdXr+W+XB8u+5LpjGqXQGOF5PJskqL5UUdwpxMfbyCezbydVQz+EAi0 X-Received: by 2002:a05:6638:3048:: with SMTP id u8mr20982902jak.91.1622477568127; Mon, 31 May 2021 09:12:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622477568; cv=none; d=google.com; s=arc-20160816; b=Qpodv6RlNAybABlvQDMiTZT49kYm4RJ74Se3aZc24HgLHjRjISCVmRIY1QKFdXWKCc Pm/O/DhHmKlqYEjZnkMLVTrm+9+MN1O2pdDNO1EyHc7YN2hEvj00ph3J4iqq3q7n3Wm7 btcTn0DciboT1FLL8UMN2t/7pAhvGY9DpNyESMfQjmB6x6OOomGWgQzkjagxVvq2hZIH KI66Vyt4rcMkHp+d5FAY2LzeMPkQ2CTBBF9h/j88X0/3FbPsK0PAraYZV1LqTpwqZZXw TnqozMuMNpI4zes7P84+i77W6TEx3N3SA4GAkIOQbGRc3cYBVkWTKBl0oXoI2VSoOfpK dVWA== 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=Hj2KDa06LqV17T6dZ921mwz0hmvyvj1+ISDhib2ZMCFjsQQG6jn098P07L9UVoSH63 KRw4Ma12YbzuFWYwzwUtB8mAZMrLZfT8QGOL3yxRrfLakPeZs3V1lFfr7wmQ2dV2CriM wiMugiTsKAiBkhJcMEsQGiAbNBQf2vDVyFuvy1EW4W/wjVhF3tZ9ZE+8zJ5SzhrVxgJB V6sCVzjIdkDD5YfLkP0q4MQSnIo7wfaDKB/eo0ifahnn4F/FZZhElqoJlI4r/Gff6c6p rPfL7QkgrMRMrhqVs/vNmYlLCW7XlBTKKrh0ZfRvy1KV78fYAxYGdJ2Udo6JCrPS/m/q wNCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=kVBMbx2V; 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 f4si15528709ilq.138.2021.05.31.09.12.34; Mon, 31 May 2021 09:12:48 -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=kVBMbx2V; 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 S232600AbhEaQNh (ORCPT + 99 others); Mon, 31 May 2021 12:13:37 -0400 Received: from mail.kernel.org ([198.145.29.99]:37206 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234075AbhEaOi0 (ORCPT ); Mon, 31 May 2021 10:38:26 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 35DAF616E9; Mon, 31 May 2021 13:52:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1622469134; bh=fXVmRXjEYXzSiN1Fw+5ymuglW2HubZD3PlHAZd4Xgv4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kVBMbx2VGi+QST4Eku/OSuCGlGm+pzNdug/pt6uU1oTLMBBsU6B5Oc0ABzI6M1bH+ LWCxn68TZESSWuH8Ed+nsJFngixlG032fEsUZfen4w5NwuyShpNEbXSGNqrV5ztAYr 3zOjVWs5LGHGuNgURHgwfId34873mwX+m2Ub9f3s= 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.12 082/296] iio: adc: ad7793: Add missing error code in ad7793_setup() Date: Mon, 31 May 2021 15:12:17 +0200 Message-Id: <20210531130706.616174779@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210531130703.762129381@linuxfoundation.org> References: <20210531130703.762129381@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; }