Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp558126rwa; Sat, 20 Aug 2022 08:59:21 -0700 (PDT) X-Google-Smtp-Source: AA6agR6dBYiyyL8GEIEXCYkYxSfBsxnbHZlaZicwTvQEwGg3IWL9w7IK0Y8J73WHe91I+eZS1BLz X-Received: by 2002:a05:6a00:10c2:b0:4f7:5af4:47b6 with SMTP id d2-20020a056a0010c200b004f75af447b6mr8458149pfu.6.1661011161624; Sat, 20 Aug 2022 08:59:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661011161; cv=none; d=google.com; s=arc-20160816; b=IwJx3wpCCZpC/sgAuYFWw8Zo+Qs/NDzIXziE+82kBI3aiOdEhtIO6OSxPzqhhnLpoT At57T3ex3wLl1h7K9Soz/byAQfWWb3UMJYOOk3wEKGW/8+irDBrAlha9GmK6Ty9n4U22 e+S09D6wtb4907yS9Lo7J3yXutbB+T9F30vhIJXozLEYiHSQenu2/k6R+K1iW+rt5d// xuomvNlhec+Z9vtUJCN2sCbvGu1aRh+lThJtNrI7J+xvQnncXhUkDGhtTz+0kEciGGoi w8oxPFot/QSvUEKL3mOxCit6NasOqu34wzi24Xv/aVsxDAzR9b/0Hitr2NPwj2BNFh3r D4ZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=OI+dqN8FSTO1y8Wkg3T+b9ezzNniW+aOx+jdGzhafCA=; b=C3/uXLQLzli5JlbD87v4xQS75U9dkY3YSQzSyjVCFJ0LE37LMp7vaIKmqlahMMzphK vwBsCuA5uZaq3q+DDkdRsla8bEhjte0bEVgiMtAm1pOEFjDFgqyPTdzMrjv9wl1swTmx 34/bFiT1xHldvvU04bf8m1wDNp6aUoRiOYW6z4U9de7q3XL0do+5THbb+2kAbjGJGOX6 f4wD3RwZo97iE9d76UmgZHQ5xhu6I3gVj2JaSXZ2dkfiUg4IYEUNstFw1mQVBlssTWN4 NUK0L7+WXUGsgGCqvM7CD7thDaw8AiiS2NyZ/nVgloxE1sIewR8UvIcDUu2hpzQajDWE Ia/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=XrQWGLC9; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j13-20020a65558d000000b0041cc7bac4fdsi7787452pgs.27.2022.08.20.08.59.08; Sat, 20 Aug 2022 08:59:21 -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; dkim=pass header.i=@gmail.com header.s=20210112 header.b=XrQWGLC9; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345621AbiHTP5h (ORCPT + 99 others); Sat, 20 Aug 2022 11:57:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58626 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233248AbiHTP5f (ORCPT ); Sat, 20 Aug 2022 11:57:35 -0400 Received: from mail-qk1-x735.google.com (mail-qk1-x735.google.com [IPv6:2607:f8b0:4864:20::735]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C3D8C3B954; Sat, 20 Aug 2022 08:57:30 -0700 (PDT) Received: by mail-qk1-x735.google.com with SMTP id j6so5193574qkl.10; Sat, 20 Aug 2022 08:57:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc; bh=OI+dqN8FSTO1y8Wkg3T+b9ezzNniW+aOx+jdGzhafCA=; b=XrQWGLC9R2rUxelr5BkTZPjv4kEimI4FNkm2IeskGCjlAXEQoi6LLP2JeCL++OuIrl GWzZvATJcNOvWpTkq4RYUvh0tLPpqgKAc1KrWgvz3B8G3gdjy7kdVg/st/Di0J9Hzz2A gS3N3tKQ8eXz2Ub/Qf8u+GU86WLRARGcNa2/0eYKhrWqwZlBJJaRa6MNYj4zHpIY4O34 SeVGIzZAOg4B3VjNfrdhTTj9Ng51/aTh5Tj/iDsAKR6EmdrFy82mw4WwbilYU9ULxfN3 /1QpstHu4Q19zbec8chKWYy1ITmEMs6DeBb5X8iz9wM+S2bXHQEyhjqyyqVXeYL9gpna GXJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc; bh=OI+dqN8FSTO1y8Wkg3T+b9ezzNniW+aOx+jdGzhafCA=; b=A3ZVq+4SgA1CjQhThTdn/3HZGymN/YIkSXKs9AThMYVkZLBIXU3nHwSfpWSJ5T/AfI lM2E0jWE/nC/D3j2pvecfn6cKxUsCK3W03BEdBea7011xJuHPrUSZM4l8RGA1G5Q9Pus Mlyyh/0GiMBFI+h5fMZxHWyNAtdIfNKdVxXYG2OThO8IMwT60zwKttKTRwcLe+QFh37A sWNdrYjPSBvaHEhM6Fjfvvyg7i5QRfotX7YOcura0HusS81LM8IM3e1zYu8AGLV+NF5/ dCg+Oebp0IrJOEZSJTYwjxQPCthqpD+LpvUkeCHpHyAIaStGvkRR3RFX7JPHbRZZkFUM u63A== X-Gm-Message-State: ACgBeo18FtJMJACU8JYeFH5mEs2Lz4FxrCWSURMuTCQ1Q0lE2eOzqVY/ x3jDrYr6aLE7rzdLUesGurhUlsUPdnJK6aNgddA= X-Received: by 2002:ae9:e311:0:b0:6ba:e711:fb27 with SMTP id v17-20020ae9e311000000b006bae711fb27mr8270445qkf.320.1661011049777; Sat, 20 Aug 2022 08:57:29 -0700 (PDT) MIME-Version: 1.0 References: <20220819104117.4600-1-antoniu.miclaus@analog.com> <20220819180856.5a1d4e5a@jic23-huawei> In-Reply-To: <20220819180856.5a1d4e5a@jic23-huawei> From: Andy Shevchenko Date: Sat, 20 Aug 2022 18:56:53 +0300 Message-ID: Subject: Re: [PATCH] iio: frequency: admv1014: return -EINVAL directly To: Jonathan Cameron Cc: Antoniu Miclaus , Linux Kernel Mailing List , linux-iio Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,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 On Fri, Aug 19, 2022 at 8:41 PM Jonathan Cameron wrote: > On Fri, 19 Aug 2022 13:41:17 +0300 > Antoniu Miclaus wrote: > > > Remove extra step where the error code is assigned to the `ret` > > variable. > > > > Return instead error code directly. ... > Change is fine, but I've dropped the fixes tag. The code before this > wasn't broken, just longer than it needed to be. We don't want the noise > of this getting backported because someone sees the fixes tag and thinks > there is a reason it needs to be. > > Applied to the togreg branch of iio.git Haven't checked myself if it's possible, but shouldn;'t we go further and return dev_err_probe()? > > 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; > > } -- With Best Regards, Andy Shevchenko