Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3696122pxb; Mon, 24 Jan 2022 15:37:25 -0800 (PST) X-Google-Smtp-Source: ABdhPJxi3HBCMGabjTv4edPirpGbJ+Fnb57IWccm0gqNwXP9uBMs/2rllmgr6ySIk1vHdgHFWtED X-Received: by 2002:a17:90b:4f83:: with SMTP id qe3mr668763pjb.120.1643067444899; Mon, 24 Jan 2022 15:37:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643067444; cv=none; d=google.com; s=arc-20160816; b=KQQ4c1n4/LRunEWcvidsZxYfPWZrRyoewlE9vyJkzpMWWbMOmdyRAIIoZYaUPTo0hU Oyl1ZaAkXxMotaBDd/D7vhua1dfvG33wkBvqjErlOmarjin5G9nj+dM7laQXGxclyYMR MRp7Kf0/GRJutmz2T3pVzP9cZBb81+tuWBZifZYWnmEGlBbokZ9OCZYgG/1S6dDFcKDN l6esdSOC+4vnGQL2YPqoUKE/U+k2vNH6IofX/7ejH0lY3OrlCkaDSQYA2OpFTFT0l4BC Ao5ppAb6I1We5DBIzFegHESJsJzstYiSvMRm7GJ6/Ry6HiExwCLWPD0TIu8QdxCy+me3 UkGw== 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=2GF5VgJZpRkOTuA/ZQ8BG1Di7Ko1rqU3OkRUavBQ7uk=; b=NnBnBTOAlti8pb9est7mUPlLv06zrNJJSR0vd4fVMFuu1tHRbMdCxwEC/gFDQeeGCL nSdD2YvHJ2mmz+Eu7E7KN3YHKJAAB+dRvPVna0Z+TXWRq1LrLve2Uyk0Zf7hL6kGlJ8A DB+1RtfRhbmfFtn6Yqmm7q8AoYGzSJcgRaN3sq/cw31rmGzxCRDBsmCF+z2BLb9KBSjf e4bBfpZOS6ytc4ZOf9daq3bab6HYARMvmIDpHnq5YPBCE4ydo4cU1kexdx/XFpu8L2Px ksaOv2yaMviph6dHlBK8oGzi+ALRb5bhrFRlB/xEaFwrmIzmdkrND9O1jawsJuMQWKVr Lkyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=QlMHGj5L; 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 i4si13320904pfr.238.2022.01.24.15.37.12; Mon, 24 Jan 2022 15:37:24 -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=QlMHGj5L; 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 S1851151AbiAXXcE (ORCPT + 99 others); Mon, 24 Jan 2022 18:32:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41890 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1836496AbiAXWjh (ORCPT ); Mon, 24 Jan 2022 17:39:37 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 54C76C054875; Mon, 24 Jan 2022 13:01:55 -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 ams.source.kernel.org (Postfix) with ESMTPS id 1327BB81057; Mon, 24 Jan 2022 21:01:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 308A8C340E5; Mon, 24 Jan 2022 21:01:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643058112; bh=3dX7I10Z+FMajBYHYlk7zmc2W2l3aPSNYjfvSrxzmw0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QlMHGj5LqkTOMZq+nuB4FeXq+0uzFGwQHgOll4B3XmBZin2jD0d2r7fuqcNHkdOhj DVVwZ1sSORhuEY0O4ZU+oFclgPTG/drzHkpEiuIQ1aV2yUGJfrBwqt/SUhHZJEsQC/ iz4AnIKqoRLvyq+pzk+Tpa03StgrXoUWoRBK9fL0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hulk Robot , Wei Yongjun , Daniele Alessandrelli , Herbert Xu , Sasha Levin Subject: [PATCH 5.16 0158/1039] crypto: keembay-ocs-ecc - Fix error return code in kmb_ocs_ecc_probe() Date: Mon, 24 Jan 2022 19:32:27 +0100 Message-Id: <20220124184130.493179134@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: Wei Yongjun [ Upstream commit 94ad2d19a97efdb603a21fcad0625f466f1cdd0f ] Fix to return negative error code -ENOMEM from the error handling case instead of 0, as done elsewhere in this function. Fixes: c9f608c38009 ("crypto: keembay-ocs-ecc - Add Keem Bay OCS ECC Driver") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Reviewed-by: Daniele Alessandrelli Signed-off-by: Herbert Xu Signed-off-by: Sasha Levin --- drivers/crypto/keembay/keembay-ocs-ecc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/crypto/keembay/keembay-ocs-ecc.c b/drivers/crypto/keembay/keembay-ocs-ecc.c index 679e6ae295e0b..5d0785d3f1b55 100644 --- a/drivers/crypto/keembay/keembay-ocs-ecc.c +++ b/drivers/crypto/keembay/keembay-ocs-ecc.c @@ -930,6 +930,7 @@ static int kmb_ocs_ecc_probe(struct platform_device *pdev) ecc_dev->engine = crypto_engine_alloc_init(dev, 1); if (!ecc_dev->engine) { dev_err(dev, "Could not allocate crypto engine\n"); + rc = -ENOMEM; goto list_del; } -- 2.34.1