Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3678702pxb; Mon, 24 Jan 2022 15:08:56 -0800 (PST) X-Google-Smtp-Source: ABdhPJzQbyOPo4cG7rgft3seJlPCqpqbAun4Q1sMTPBpFnaKSSEQAEguxN5Hmh6QsaZv0QxgwWN0 X-Received: by 2002:a17:90b:3e89:: with SMTP id rj9mr566800pjb.91.1643065736213; Mon, 24 Jan 2022 15:08:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643065736; cv=none; d=google.com; s=arc-20160816; b=xvd5chGvGoDelPhSdN9WGSu+YU6FpNnd2lOFjVr8rLic63waFwJB4+b7bIUs3+vtQF njh/Vst6RfN5yW/cTjJgA+I4OiBoD9ZwRY5oZ0poavEry4zWoF8vsxPNPyePXWAFw1dS L3Ez+3YVdTO0wy+mBg6FSVzEfuUMra2olPq+yv4ikXnhMwmAVHTH3+y60age6+onUGfQ wXmhgrjbhwBlyG3Yl00hRGvX772yLnlwQA+cYsNojPGXQj9AXFk3jlEbI/ZJluG8wChd Y2IV3f6JNcM+YtZPFyq3k0YX/QvtiQXbxAQWXMTzkoGlXGRUXbVDaj6i5GNE3TebhjRs maxA== 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=1FvrpHY1VRerLBL6mCdxgiroSTbLnnJAyIA/Y01Ik5Y=; b=wjrt9mALmrQ2BJqBq3Kve5G3tWlNt6Feb/cAA3BHpIrV4WXxfPBoZx50+PJFvSf7u6 UgQ75t17djrKRysz3115SfgYsu7rYjeBI9+t1m+QLdBpH6zwfD80jYwMR/CjI+MgkI5v zsIgEsr0SgLvHH6kGwFzmUp2yDhcmXjF7xG5U5vJQLl9wWwCaZbhPtoj/gk6Kjerqjhg DDuEfRc/BOGAzwDRaGDXMUb8pG5GRcNJZ3OTFTjG1ldZx6b2/0a8bfT1bfL8xr2tia/i i3d39m0rJ/zZ9jqj2s1HdmRiP89FigaOqoKsZ2MncJkWESXoJQdYkUgLdipGkgTPN2f1 z0cw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=XuYn9ko7; 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 j9si15226306pfu.84.2022.01.24.15.08.44; Mon, 24 Jan 2022 15:08:56 -0800 (PST) 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=XuYn9ko7; 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 S1383661AbiAXXFz (ORCPT + 99 others); Mon, 24 Jan 2022 18:05:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37106 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1583666AbiAXWTY (ORCPT ); Mon, 24 Jan 2022 17:19:24 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5E8E2C06125A; Mon, 24 Jan 2022 12:49:13 -0800 (PST) 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 F05FE60C19; Mon, 24 Jan 2022 20:49:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C90D9C340E5; Mon, 24 Jan 2022 20:49:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643057352; bh=vtrHks515mWWDB8VUuf53R07+1bjr6PyWKO1q/bUdAk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XuYn9ko7T1riLHUCNxGTQx8tifdek2T39IJNT0CEODfrQp3UgBQTfHM+mpmNhndph tHuYpKayrJFR521rwcUhVGsLFKK8GV6dVSd9vDhFlTWjnmSpKWkKxBT8gsJjdtb2Sl FJ7tlJWKfEUO9KdVgSXzPB5CxIzSnXmPPd+FAFss= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dan Carpenter , Herbert Xu Subject: [PATCH 5.15 783/846] crypto: octeontx2 - uninitialized variable in kvf_limits_store() Date: Mon, 24 Jan 2022 19:45:00 +0100 Message-Id: <20220124184127.968997311@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124184100.867127425@linuxfoundation.org> References: <20220124184100.867127425@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: Dan Carpenter commit 0ea275df84c389e910a3575a9233075118c173ee upstream. If kstrtoint() fails then "lfs_num" is uninitialized and the warning doesn't make any sense. Just delete it. Fixes: 8ec8015a3168 ("crypto: octeontx2 - add support to process the crypto request") Signed-off-by: Dan Carpenter Signed-off-by: Herbert Xu Signed-off-by: Greg Kroah-Hartman --- drivers/crypto/marvell/octeontx2/otx2_cptpf_main.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) --- a/drivers/crypto/marvell/octeontx2/otx2_cptpf_main.c +++ b/drivers/crypto/marvell/octeontx2/otx2_cptpf_main.c @@ -494,12 +494,11 @@ static ssize_t kvf_limits_store(struct d { struct otx2_cptpf_dev *cptpf = dev_get_drvdata(dev); int lfs_num; + int ret; - if (kstrtoint(buf, 0, &lfs_num)) { - dev_err(dev, "lfs count %d must be in range [1 - %d]\n", - lfs_num, num_online_cpus()); - return -EINVAL; - } + ret = kstrtoint(buf, 0, &lfs_num); + if (ret) + return ret; if (lfs_num < 1 || lfs_num > num_online_cpus()) { dev_err(dev, "lfs count %d must be in range [1 - %d]\n", lfs_num, num_online_cpus());