Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp2474461pxm; Sun, 27 Feb 2022 22:53:34 -0800 (PST) X-Google-Smtp-Source: ABdhPJwFgIzNUxPEu7mPkbnn6ajajtv3ryA2bsEq+uXMwsUcUmN1yrtGkb3Nsnztkh+2DLpmZxhE X-Received: by 2002:a17:902:b715:b0:14d:bb53:da0 with SMTP id d21-20020a170902b71500b0014dbb530da0mr18927235pls.18.1646031214199; Sun, 27 Feb 2022 22:53:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646031214; cv=none; d=google.com; s=arc-20160816; b=ddA5aNaxcEdKSewttO2IdYvPnKRkfzOWtLU1N4/wBohcaLJUA3huxIacxPKKDQ1u+9 Zu4vUZ/9TwrhisLrs7pN2Rm0AZwF3U6i4Q32wNU3zn9CLTz/7J5UWtQOFRREMc2BiRub 6w200nTk0OkZI6iAhqH0wvlngE9uI6FJQk3F++Js8ug7rURkuyVsNuNXN4KKPze3vI1+ cmgOw95Kgcn2SgK/mgsczGtRVqsX/Oj+/zaUN0R36vSB2ydLROC/u4tmQbUQ3B+feHsx rWac6d4pPik+jxUclO5nspnx/6M2exy+9dTLMqgC1hVZ3wBW1LUmkau/zkU98JeYSs6/ Qu2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:feedback-id:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from; bh=jHpD9MvSXbhuSww5y1iuqCJgyiBS585HMs73T4URA7E=; b=hd3UyCXUe622iRZ6VbXPLH/6AnrByGUpKcEW/RJGyqxDogQPoUnWHvPffDfvlyJFSI 8qHuG2RXN2dF9EAshU8AOr1Y/D700rXQx/zzWZSa0e0ab3B8K0mqwojIeLd8sqFAl19L rJZZVJQNgbl5YHbXtL0Fd2u0YjEKAgj0bMBY/JZtixxgyawSVGCH2KS2mtCWoFrD+9xN xN3KHan5ChgGlEeptVUbyN9wqZ7BZKdrIpaBB/9I0pOL+bTfXa7ZZjALpIqJ8Et+MT5w hbWLZpiB4nbApnADQxNd2EBUdG8z84sD9KcPJd6ZVW9LFMteZOtY4KjOFqjfmevzkI+9 OaAg== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 69-20020a630448000000b00373a00abb6bsi10200940pge.371.2022.02.27.22.53.18; Sun, 27 Feb 2022 22:53:34 -0800 (PST) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232240AbiB1DHS (ORCPT + 99 others); Sun, 27 Feb 2022 22:07:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34386 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231558AbiB1DHR (ORCPT ); Sun, 27 Feb 2022 22:07:17 -0500 Received: from smtpbgsg1.qq.com (smtpbgsg1.qq.com [54.254.200.92]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7E20E220CA for ; Sun, 27 Feb 2022 19:06:35 -0800 (PST) X-QQ-mid: bizesmtp71t1646017585tf1kv1pq Received: from localhost.localdomain (unknown [58.240.82.166]) by bizesmtp.qq.com (ESMTP) with id ; Mon, 28 Feb 2022 11:06:23 +0800 (CST) X-QQ-SSF: 01400000002000C0G000000A0000000 X-QQ-FEAT: F3yR32iATbhMswa43cCXQHfEbNdpcZJqhgsZXmS4JMIo72f+8AuPrT0TAHQCl 3y5g5/xie4JEhHs+aoXSf+l8rQkoNAHdopjLIhi+BgCH6KvsLyXQb/tzCZ62OYo9mBH8riq t6UVCHTCbr4TZ+PZCGDHjfMW6GNWeEL7wTtXA5kPHnCR3uWIFncMVDkpXJ2jmNZFOmAEcpf ar+WJgpSKDo3mtKdB1+LxC+pGIuF3JXcpT6dA8EU1aW7sesbM3cIq6pPe6fGGK9lJz14kga xze6NaDfaendO/f5YXVbCkVwLW+XQHMgASwqi3oi/8VoHPz3FoLhnwfMCejmiuP6qWDSBGu 3D6Qx4A5UjiALhhE/ItXBhN68JhKCltWb90MD5I X-QQ-GoodBg: 1 From: Meng Tang To: perex@perex.cz, tiwai@suse.com Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Meng Tang Subject: [PATCH v2 2/2] ALSA: core: Remove redundant 'err' variable Date: Mon, 28 Feb 2022 11:06:14 +0800 Message-Id: <20220228030614.10606-2-tangmeng@uniontech.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20220228030614.10606-1-tangmeng@uniontech.com> References: <20220228030614.10606-1-tangmeng@uniontech.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:uniontech.com:qybgforeign:qybgforeign2 X-QQ-Bgrelay: 1 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,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 Return the result from file->f_op->open() directly instead of taking this in another redundant variable. Signed-off-by: Meng Tang --- sound/sound_core.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sound/sound_core.c b/sound/sound_core.c index aa4a57e488e5..3ac679ea31c7 100644 --- a/sound/sound_core.c +++ b/sound/sound_core.c @@ -582,13 +582,12 @@ static int soundcore_open(struct inode *inode, struct file *file) * We rely upon the fact that we can't be unloaded while the * subdriver is there. */ - int err = 0; replace_fops(file, new_fops); if (file->f_op->open) - err = file->f_op->open(inode,file); + return file->f_op->open(inode, file); - return err; + return 0; } return -ENODEV; } -- 2.20.1