Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3663997pxb; Mon, 24 Jan 2022 14:48:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJy+mwrm4pOwri7fFmPwjmXfIupS0Pk2WKYiDjn6JeiK4MhXkElhPc8zmszrxQnsS4ZWYb6G X-Received: by 2002:a17:90a:560c:: with SMTP id r12mr501667pjf.33.1643064512023; Mon, 24 Jan 2022 14:48:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643064512; cv=none; d=google.com; s=arc-20160816; b=JjxcSki1qKAzo0mzZB6ro3mcmZ6hzEV5WP5h3TUdWblYoBi12PFp0CvClJ8emVEph0 wgL/UGrk5RCMbNxRbUnhqZxZb+k402VsH81M/KXZTP4OpKVgEbYa2YFn3wqqNedIlIBN +Y9ARrz9e/dB7uW8Kl6dsiTODJz2oqnaPewuCyyvybIOiSMEiW6kh+if6UFbTxf33BBT f/zSvpNPbX4hv8WW2lVItY+NVgUPJ9FOI9Lnj5BSorpLWyFcWzYBopII8x/lCXYu9EJM GmyYYMM7ZUJo/hlUy9zlSDpvY8lsYxMEcF4iCKPqZwTBwPaDmhzCjR0Qfhu458Eg5Cml vjvQ== 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=K7M/nLBmicwFZ5QSxA+aPxPWSHfeHhRQN/UX061Vm6KJVLuLfYKEQWz81l8WNJo08l +gd9Z9Tc+1TXxQdzOD4qwwHLKqqWhGu/kCoHMHimN1Sv3UXqEx3hTek/PtD3dYesq4q0 GaPbugi7fu2m/UVhGdaejQCIbZsxqasuisPWAqneq4zzJa8ORXHyIaEdAlEKZfJUw6u8 PTT/pwWWQb+8rKlSRdytebKDZbpFPc0M05mmODQUUL0rsyP2OEI3wmQV8wQ3VfiGyGnj m0XD8T06VFxkQg+ZHn/VHRacDPE3WUr2pOtZFzWIA6YHjUyHTylYGwtNjIMdZDChw3hj fPdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=MJr4evXS; 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 203si5660549pgb.477.2022.01.24.14.48.19; Mon, 24 Jan 2022 14:48:32 -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=MJr4evXS; 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 S1838192AbiAXWqD (ORCPT + 99 others); Mon, 24 Jan 2022 17:46:03 -0500 Received: from ams.source.kernel.org ([145.40.68.75]:51902 "EHLO ams.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1457231AbiAXVlP (ORCPT ); Mon, 24 Jan 2022 16:41:15 -0500 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 ams.source.kernel.org (Postfix) with ESMTPS id 53A2EB80FA1; Mon, 24 Jan 2022 21:41:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 71380C340E5; Mon, 24 Jan 2022 21:41:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643060473; bh=vtrHks515mWWDB8VUuf53R07+1bjr6PyWKO1q/bUdAk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MJr4evXSCfy6Y7me42GLRX+GY/tXtGApTzG12Bo3Bu21oOzRlHbwyLMrQBFLWoY8O o0qNntsyeKgpiaXhhWLgDbc7A8ifSdgrkqJymvdEcAJqkUBC52noQtIOclfCGrFtzP HGHKbuLKG0RqBi8xCq4gKifBvDsVFw1UXJt6QeQc= 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.16 0959/1039] crypto: octeontx2 - uninitialized variable in kvf_limits_store() Date: Mon, 24 Jan 2022 19:45:48 +0100 Message-Id: <20220124184157.530557206@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124184125.121143506@linuxfoundation.org> References: <20220124184125.121143506@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());