From patchwork Tue Feb 6 21:20:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Artem Savkov X-Patchwork-Id: 10204151 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 62FB460247 for ; Tue, 6 Feb 2018 21:21:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 56CE2205FD for ; Tue, 6 Feb 2018 21:21:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4B321288A3; Tue, 6 Feb 2018 21:21:18 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FROM, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D7D05205FD for ; Tue, 6 Feb 2018 21:21:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=mJ6vuajQQYmktIIjX5w9BKlUHS6l32t8Hwx++cxr238=; b=KdmTS1sFvP6H4nORlTe7Aanf82 Sch9ZGNGuD4SPZTZqt5Vlh1NrvlW5kw+yMxQ7nupqGypWXMuIA0haKMt5Ag0B1ZYyUrt8DjmRVi/m UXXRhyOFWDDaiiLuD3Wy1L2YAFlrEN9jW5mt52brrxSZzgfLvzFJJutKLiu825TxH1fbB9bSBQ5r0 hCOCYMF9ABN0IV0dsPRPrYFNPmXQ0EsJWdAQV9OZmUBgTXCVexUkze1MTXTqLFtyIfaqT5gWMMeJf pstW0/oNrlq2C2mhEBXv8iI5CrnBnsbk0Qthg7hSFd+kNUYYiUt2Pgq91J3ty0dDA0ut6Q8VzBLCO BKq+Obyg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1ejAg0-00067Y-D1; Tue, 06 Feb 2018 21:21:16 +0000 Received: from mail-wm0-x244.google.com ([2a00:1450:400c:c09::244]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1ejAfX-0005bd-SQ for linux-arm-kernel@lists.infradead.org; Tue, 06 Feb 2018 21:20:50 +0000 Received: by mail-wm0-x244.google.com with SMTP id f3so6642584wmc.1 for ; Tue, 06 Feb 2018 13:20:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ssf7NxCX3UZpyQhAkVg7gk9eiP/JTZpoK4LJm7nf/h4=; b=ND/lnU41m7ykx6NeT98cXW1TwsZLM313smn/nWeSfDzewJdrEQkEwDDarSN8b1Vp7g Tyhm4N73KlL8Hno+LXLdNIWFews8WAi+hhIwGce7V5rtJOoXcNH48ekwU7WvIHdzkOmz b/r2Q7JN2Bwn73DvLKfDu/J/nM5JXiPwkbU5ytBKTcII5zz8FsSW7eU0XSU5U+cNOunD fXANd5pihUd1RHNAAF8hm3WDxUrynOdtDE1YeHkYvSx756mJowKWprttYRRzKhL/QCb0 08zT67SJkNc0KMWaHliOKVzIPgjsfGBJma7O43EexRX1BWRIv0MeIVJSFhttARGx0Oga mlfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=ssf7NxCX3UZpyQhAkVg7gk9eiP/JTZpoK4LJm7nf/h4=; b=A5BxhtviCG8e+9TLPct5yVDRKUzjsmZC3kEhzcGYT/BEMjc65ATnd0I+IgfiCkrx9f eocKfRBvm5UlE4mXTBJpwGTQ1dnh/gxKxcW52P3NiCBNlI6FhXVeQ7Wc4AqCm4vo8ajb 99duXTOjUdilF3/De0FKa/EZJYDJSeeAFQp7FAqKZko8N/ERqtMfnlSC58stgqA28Du0 TUylyf67TpNA2M3pPL/MqY0hTkvyc4QmR1+3YCnPmx5q81kw0sUMhyQ6Rb7wroZZfU2H HBwx79JeFp66r9N5nhx2E9trUy0xRPd/wW2BrsxK2GqInJ2CXpbSTzxA/imhwEN/RWxK 1vmw== X-Gm-Message-State: APf1xPALTUrxo/ZPQ8nhBKswYybgTBPr/RA4jQD7NRr4PA/0OwvYC67B dOyH736DEGyiYvG5wlkyGdA= X-Google-Smtp-Source: AH8x226QaRUMu5++K7q1GPqnK/6G5GC59COyvhdljJRtRt/u3JXoQuBQrz9f6UiQ+DiAZ5v4rp/EoA== X-Received: by 10.28.137.85 with SMTP id l82mr3032377wmd.109.1517952034406; Tue, 06 Feb 2018 13:20:34 -0800 (PST) Received: from localhost ([176.74.128.122]) by smtp.gmail.com with ESMTPSA id g13sm10409345wrh.51.2018.02.06.13.20.33 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 06 Feb 2018 13:20:33 -0800 (PST) From: Artem Savkov To: Corentin Labbe Subject: [PATCH 1/2] sun4i_ss_prng: fix return value of sun4i_ss_prng_generate Date: Tue, 6 Feb 2018 22:20:21 +0100 Message-Id: <20180206212022.1309-2-artem.savkov@gmail.com> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20180206212022.1309-1-artem.savkov@gmail.com> References: <20180206212022.1309-1-artem.savkov@gmail.com> X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-kernel@vger.kernel.org, Artem Savkov , Herbert Xu , linux-arm-kernel@lists.infradead.org, linux-crypto@vger.kernel.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP According to crypto/rng.h generate function should return 0 on success and < 0 on error. Fixes: b8ae5c7387ad ("crypto: sun4i-ss - support the Security System PRNG") Signed-off-by: Artem Savkov Acked-by: Corentin Labbe --- drivers/crypto/sunxi-ss/sun4i-ss-prng.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/sunxi-ss/sun4i-ss-prng.c b/drivers/crypto/sunxi-ss/sun4i-ss-prng.c index 0d01d1624252..5754e0b92fb0 100644 --- a/drivers/crypto/sunxi-ss/sun4i-ss-prng.c +++ b/drivers/crypto/sunxi-ss/sun4i-ss-prng.c @@ -52,5 +52,5 @@ int sun4i_ss_prng_generate(struct crypto_rng *tfm, const u8 *src, writel(0, ss->base + SS_CTL); spin_unlock(&ss->slock); - return dlen; + return 0; }