Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp1449815rwb; Fri, 19 Aug 2022 04:04:22 -0700 (PDT) X-Google-Smtp-Source: AA6agR5EBWkattxSOwLJzolggwd95C8KP+n37RK812WqaRoswjdimhlicDHYhgX5Tr1M/X5A0bgN X-Received: by 2002:a17:907:16ab:b0:731:55c0:e7a1 with SMTP id hc43-20020a17090716ab00b0073155c0e7a1mr4504038ejc.154.1660907062252; Fri, 19 Aug 2022 04:04:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660907062; cv=none; d=google.com; s=arc-20160816; b=XjR97fnPObnQnUDbFEUkDI8Kq/x7T9kurTn0aNuIcV786qn6wg3lNOS/eIOwQT/xdG xEcM6YMrGu/ceqeJZCRUak3PjmeWDBTDbhmvi3+X1hMVbc2v7pT5MaoVmP1kNKOVjftJ 6brRp1WG6hx0rwnSwV68jcnxLcrSDhiWa0XgXLFrZmA41k5kyGOm/ysb3wiwqcwOd2CJ uZNUBaBaUdhg66JyrFDesLaE39duW99hg86ZPEjbmPZHb1kUOmHza55IfmSq/Qz+DE6Q df09ttcC+LzIkj8fjGrx7S+rfJthmWtbGBvIcVDG0CNY/Sz3xHF2vrNLxbP0Eg9U2qqG 0tog== 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 :message-id:date:subject:cc:to:from; bh=gVl8AHXxXoDWzbdbI38/S2L6XygloM1MRFYa/btUqrc=; b=01zKaJhart/+PZtv9JtFz354h5XcEbMB9GU6Jm4s88z8FQDA6X59PFnWekhOd9nlLp 2NBTldxjapSxOY5gtOU7CFsvaul7dWYpdw4Hh0tMJyxc58xXs+PsR5u/hs08fgsBxaSS /rVqmMKqlBWg30Bpdm51QJIvkXtxcKhT2IeDzlu19+OEqo3evEDE5wj0ehbw9mLTobVJ SIJoaa2y48zHmYM1zAxphfPE+CuGnqz8FZICwkZV2mRboh3FqW4GMKN+1gkqP+8I618e RxP6CYchIsFUlGomAqG0JRz6XnaRLonofuHpG1yrUkATdB7ZPzJVmHaps6rVuRVhL/oD y/Kg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=analog.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e19-20020a50d4d3000000b0043d2ff128cfsi3055076edj.286.2022.08.19.04.03.57; Fri, 19 Aug 2022 04:04:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=analog.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348400AbiHSKls (ORCPT + 99 others); Fri, 19 Aug 2022 06:41:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35522 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348128AbiHSKlp (ORCPT ); Fri, 19 Aug 2022 06:41:45 -0400 Received: from mx0a-00128a01.pphosted.com (mx0a-00128a01.pphosted.com [148.163.135.77]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 77FEAF4C90; Fri, 19 Aug 2022 03:41:44 -0700 (PDT) Received: from pps.filterd (m0167089.ppops.net [127.0.0.1]) by mx0a-00128a01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 27JACKav021438; Fri, 19 Aug 2022 06:41:36 -0400 Received: from nwd2mta3.analog.com ([137.71.173.56]) by mx0a-00128a01.pphosted.com (PPS) with ESMTPS id 3j0qt8can9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 19 Aug 2022 06:41:35 -0400 Received: from ASHBMBX9.ad.analog.com (ASHBMBX9.ad.analog.com [10.64.17.10]) by nwd2mta3.analog.com (8.14.7/8.14.7) with ESMTP id 27JAfYN3021584 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 19 Aug 2022 06:41:34 -0400 Received: from ASHBMBX9.ad.analog.com (10.64.17.10) by ASHBMBX9.ad.analog.com (10.64.17.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.14; Fri, 19 Aug 2022 06:41:33 -0400 Received: from zeus.spd.analog.com (10.66.68.11) by ashbmbx9.ad.analog.com (10.64.17.10) with Microsoft SMTP Server id 15.2.986.14 via Frontend Transport; Fri, 19 Aug 2022 06:41:33 -0400 Received: from amiclaus-VirtualBox.ad.analog.com (AMICLAUS-L02.ad.analog.com [10.48.65.140]) by zeus.spd.analog.com (8.15.1/8.15.1) with ESMTP id 27JAfOtB029436; Fri, 19 Aug 2022 06:41:27 -0400 From: Antoniu Miclaus To: , , CC: Antoniu Miclaus Subject: [PATCH] iio: frequency: admv1014: return -EINVAL directly Date: Fri, 19 Aug 2022 13:41:17 +0300 Message-ID: <20220819104117.4600-1-antoniu.miclaus@analog.com> X-Mailer: git-send-email 2.37.2 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-ADIRuleOP-NewSCL: Rule Triggered X-Proofpoint-ORIG-GUID: obsOlVgpv8OgL20XfeqXzTxC09llUaa_ X-Proofpoint-GUID: obsOlVgpv8OgL20XfeqXzTxC09llUaa_ X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.517,FMLib:17.11.122.1 definitions=2022-08-19_06,2022-08-18_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 phishscore=0 spamscore=0 impostorscore=0 malwarescore=0 clxscore=1011 bulkscore=0 adultscore=0 suspectscore=0 priorityscore=1501 mlxscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2207270000 definitions=main-2208190041 X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Remove extra step where the error code is assigned to the `ret` variable. Return instead error code directly. Fixes: f4eb9ac ("iio: frequency: admv1014: add support for ADMV1014") Signed-off-by: Antoniu Miclaus --- drivers/iio/frequency/admv1014.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/iio/frequency/admv1014.c b/drivers/iio/frequency/admv1014.c index 865addd10db4..bb5e1feef42b 100644 --- a/drivers/iio/frequency/admv1014.c +++ b/drivers/iio/frequency/admv1014.c @@ -669,8 +669,7 @@ static int admv1014_init(struct admv1014_state *st) chip_id = FIELD_GET(ADMV1014_CHIP_ID_MSK, chip_id); if (chip_id != ADMV1014_CHIP_ID) { dev_err(&spi->dev, "Invalid Chip ID.\n"); - ret = -EINVAL; - return ret; + return -EINVAL; } ret = __admv1014_spi_update_bits(st, ADMV1014_REG_QUAD, -- 2.37.2