Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp96918iof; Sun, 5 Jun 2022 22:15:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyXZNftwOdaJG1uVOI7Eo3vMAePUg9UZAF9QmTcJKSW9+uMAMD048YqgzU+ZUMS3+0uU5ob X-Received: by 2002:a65:5601:0:b0:3fd:af27:6e68 with SMTP id l1-20020a655601000000b003fdaf276e68mr4154549pgs.494.1654492547949; Sun, 05 Jun 2022 22:15:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654492547; cv=none; d=google.com; s=arc-20160816; b=Uucj8YVv6sLfJ35bHns9Pa4nwsFnNxzS2yjXZLXR4Jt0yt3DKFnsuQ2yxwqhrVXiaq Ren+qbzZ3NrXX9RvC3eoZrsMLH6cEeU/YlYdeNCAc5qowLuyhVqeVCv9YejgtobxG+8R cCDLh2v7nSGtoI7vEr52y7qtCP0U5CIinLHm6aNAtfVd+VTRsTzNB3RefPG1JWbGAHuX DlQXJ2iUg3Q7FLG44CwPmE7sRn6k5DQKnCQU/UJDRL6VTDts7uzrR9X/YyzZIbA2v5vW t/UtCQKYs2ZxPWzorV3uBU4zQic1iwjIAB9bIPkU/4hKR2xRKFtOp7PoL+uZyIhi4U3c iEiw== 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=brto1xzSdGxy6KtSpgBLyrypKk3pOJ3Hfzl7Oa+2Nzs=; b=JPCqZl7SPoRQoBb79Nav03XOn5qbcaYazj57WKGc+CZXH9EIOBQKMnulWJSZiIM1+M rgCyU6cf+mBGpy1c4VPD8kFpcQHG06x5k0t3UaUDxtyruP8KxrnNMrSig1mg2qOyx3ZE 18JWQA/adGVEhQQRMwydBU3LbI+8La9mJj+Eam2hkBI3HGNv6XdvbV1/GBOqX/bXBseC xqJ1PNuO7ByVPhz8rskfue6fVObXe7lJ9Z8S0MsFPprkqIyc4Aw6OzQWZB486Dg8k4DC bOXai8pm6fYro35CxVLO7L9xtBbsM3tcvjwdKJ8K8kL2OVe6zJvgImVLwUJZJr1K66rd 0tmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=STVeq1DZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1: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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id k12-20020a056a00134c00b0051bbc49b00bsi18681645pfu.121.2022.06.05.22.15.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Jun 2022 22:15:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=STVeq1DZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1: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: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 9729416ABEC; Sun, 5 Jun 2022 21:21:33 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347536AbiFCSGH (ORCPT + 99 others); Fri, 3 Jun 2022 14:06:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58002 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346349AbiFCRvG (ORCPT ); Fri, 3 Jun 2022 13:51:06 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A743654BDA; Fri, 3 Jun 2022 10:47:43 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 1789260EE9; Fri, 3 Jun 2022 17:47:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 22192C385A9; Fri, 3 Jun 2022 17:47:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1654278462; bh=8J6A5geKPVvuD2x5UavjHBtKad8WfOYc+Ka14cVs3HU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=STVeq1DZ88cqGdFrFNFCJcxKrGXqIL8uGMKTKGpCFRoUB7iznXmS6AdhVV2y3iOXk 1JfWoZeK49qLkDsRp1XKBcopu1YiafZVfnfDY/BtxqK9VLDk6vZ3UDRaJaK8HcsHAp rRH8jzktJGPFdwl9O6mUcjz/yxuNW5tWmTQhh88s= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dan Carpenter , Mikulas Patocka , Mike Snitzer Subject: [PATCH 5.10 40/53] dm integrity: fix error code in dm_integrity_ctr() Date: Fri, 3 Jun 2022 19:43:25 +0200 Message-Id: <20220603173819.887024892@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220603173818.716010877@linuxfoundation.org> References: <20220603173818.716010877@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 From: Dan Carpenter commit d3f2a14b8906df913cb04a706367b012db94a6e8 upstream. The "r" variable shadows an earlier "r" that has function scope. It means that we accidentally return success instead of an error code. Smatch has a warning for this: drivers/md/dm-integrity.c:4503 dm_integrity_ctr() warn: missing error code 'r' Fixes: 7eada909bfd7 ("dm: add integrity target") Cc: stable@vger.kernel.org Signed-off-by: Dan Carpenter Reviewed-by: Mikulas Patocka Signed-off-by: Mike Snitzer Signed-off-by: Greg Kroah-Hartman --- drivers/md/dm-integrity.c | 2 -- 1 file changed, 2 deletions(-) --- a/drivers/md/dm-integrity.c +++ b/drivers/md/dm-integrity.c @@ -4327,8 +4327,6 @@ try_smaller_buffer: } if (should_write_sb) { - int r; - init_journal(ic, 0, ic->journal_sections, 0); r = dm_integrity_failed(ic); if (unlikely(r)) {