From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D6E10C433E6 for ; Tue, 9 Mar 2021 06:46:11 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3DA6B6527B for ; Tue, 9 Mar 2021 06:46:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3DA6B6527B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=vvypNhdn6KX6FFJlgscvWDzL7gCfBAnZqMVNwfqExbM=; b=L6cOHUEx5FGoTYySVBcVK1GAO VpQMgkRPblYZVJ1osVMkmbxzpirkwLbed5lKkXc1V+YTchMQAqhsDwt0WA5YSS/nmJ6lelJJNXeR0 wJ6L5yojNNMl1ZM1ytZlSC2ipQdP6BLNrgOl0o/8Na5uz91U7FiO2e+sBGZxtkNqup/q4RodhncC+ LFRBun/6+7oY++7XNL1n4JbnZxSuX/Fpm0fEtxUbM3yyD5iv3P/m4TLJf5LhmlbV7YHW1xE8t8kTA VUu2goaXJBaibZCKh3uHFhdtR0X5v4JloEc/BKJjciSnOiXjYiKehv42XL+za7X3S9QVyo6Gd8Mjh B4LrUtY1g==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lJW6g-003v00-TR; Tue, 09 Mar 2021 06:44:39 +0000 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lJW6V-003uyd-IW for linux-arm-kernel@lists.infradead.org; Tue, 09 Mar 2021 06:44:30 +0000 Received: by mail-wm1-x330.google.com with SMTP id n11-20020a05600c4f8bb029010e5cf86347so292331wmq.1 for ; Mon, 08 Mar 2021 22:44:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=2JHRd50/kPLmHMK3WxdvVTSTozSu9PH/WpTXEeChnyE=; b=ghr9Qad7J9ZRYAnGAi34lefkzp2nEB/e5LE6P8WH8HiwQPm7/Ut12LxCTvGqL0zWON PqOXx8EK0S04QM3vo4f/+gRtinYef7cZ36Be4LPWvPo/9YDfbg5ONNQ8SajbxRcVTTYa Q2tdOnrySrojnRiSxFNglImAVDSnYZEuFe+HNnLvkILAQ+x4t13o3oMsJ/S38otaAVYT +RxacbGOdgFFQ3NUjwda7ywOnhoLGj+duCzy5Qg8TSB/AjHofdF9lhXWRBZaG6NRN62T TiLlNMuznCH1xYii7sIHVN/Q9x2FHbj+ok0oXmEotNGQBgrpR4c463gtYntyPX9GWvpX Bovw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=2JHRd50/kPLmHMK3WxdvVTSTozSu9PH/WpTXEeChnyE=; b=jiQQD85qdljeq2RXJ+pgIx15+Oe/QYaKXXp/rUCrNcI0rooqUacFf9X+eLtIsMYmJ3 yFil2kU7QN73dXuZtqVtgTYIYotG0pmyq65a/rxzHtZQxjYEWxM491k+Zacslus+nZ9R 047/7zQ04VCu3EAhhj9MoJqk52rJ4AFIfr7w82YhtuiTCib4POQauffgV0TSesAvdKEO 3TMeqYypoa7rTYA8zNWoUFBS1de4MTM8aLlPk8TRlzXBB5pfZ3YUPMKHCaqfKomxiDSN IEdkgSzzy+fQz1c5cNv8C0jZCobZ5eWK3AKWM2+EqMymMdeWVt20zTKOMnU5RwG9QyVP nB/A== X-Gm-Message-State: AOAM532/KOWZysE1AEGy+MJaYU+v3GjSwJajPlu3Pu8rV/+PQm3uzmJ4 ZEPKJogtjotKBh/xcJLxFMs= X-Google-Smtp-Source: ABdhPJySGhQnlkUyi7Q1TduiVYiIOsOiHUSRv+jFG67fcghd4bI4a5ImlczvxAZVW+ThKsvwknXnPw== X-Received: by 2002:a1c:4e07:: with SMTP id g7mr2290403wmh.29.1615272266576; Mon, 08 Mar 2021 22:44:26 -0800 (PST) Received: from Red ([2a01:cb1d:3d5:a100:264b:feff:fe03:2806]) by smtp.googlemail.com with ESMTPSA id y8sm2368184wmi.46.2021.03.08.22.44.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Mar 2021 22:44:26 -0800 (PST) Date: Tue, 9 Mar 2021 07:44:24 +0100 From: Corentin Labbe To: Jia-Ju Bai Cc: herbert@gondor.apana.org.au, davem@davemloft.net, mripard@kernel.org, wens@csie.org, jernej.skrabec@siol.net, mchehab+huawei@kernel.org, corbet@lwn.net, linux-crypto@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] crypto: allwinner: sun8i-ce: fix error return code in sun8i_ce_prng_generate() Message-ID: References: <20210305015717.2908-1-baijiaju1990@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210305015717.2908-1-baijiaju1990@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210309_064427_751243_F6D44D98 X-CRM114-Status: GOOD ( 15.54 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Le Thu, Mar 04, 2021 at 05:57:17PM -0800, Jia-Ju Bai a =E9crit : > When dma_mapping_error() returns an error, no error return code of = > sun8i_ce_prng_generate() is assigned. > To fix this bug, err is assigned with -EFAULT as error return code. > = > Reported-by: TOTE Robot > Signed-off-by: Jia-Ju Bai > --- > drivers/crypto/allwinner/sun8i-ce/sun8i-ce-prng.c | 1 + > 1 file changed, 1 insertion(+) > = > diff --git a/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-prng.c b/drivers/= crypto/allwinner/sun8i-ce/sun8i-ce-prng.c > index cfde9ee4356b..cd1baee424a1 100644 > --- a/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-prng.c > +++ b/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-prng.c > @@ -99,6 +99,7 @@ int sun8i_ce_prng_generate(struct crypto_rng *tfm, cons= t u8 *src, > dma_iv =3D dma_map_single(ce->dev, ctx->seed, ctx->slen, DMA_TO_DEVICE); > if (dma_mapping_error(ce->dev, dma_iv)) { > dev_err(ce->dev, "Cannot DMA MAP IV\n"); > + err =3D -EFAULT; > goto err_iv; > } > = > -- = > 2.17.1 > = Hello Tested-by: Corentin Labbe Acked-by: Corentin Labbe Thanks _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel