From patchwork Tue Nov 5 14:01:09 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tero Kristo X-Patchwork-Id: 178516 Delivered-To: patch@linaro.org Received: by 2002:ac9:3c86:0:0:0:0:0 with SMTP id w6csp710228ocf; Tue, 5 Nov 2019 06:02:07 -0800 (PST) X-Google-Smtp-Source: APXvYqzgKkW7CfGwvHxJvW3iV3Rga0FbeyAa3B9fNggxZG6KkNplp2m3BEFf0ma3Sc/AwncVh9H/ X-Received: by 2002:aa7:d908:: with SMTP id a8mr17335107edr.173.1572962526913; Tue, 05 Nov 2019 06:02:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1572962526; cv=none; d=google.com; s=arc-20160816; b=pN1ABDmA5+WZJzDwYDKj1NS52gSqSTP4ZwUKvXgHvfePjORjzbvVPG8BAlTA57GVMp PMqKiSgx0AFKDgJ8Hc26EFh68FYpKtsSMUdDGn1oLNAkEhRDY9hPbqwQqVSi2Ho0puNN eX4W6KxDqX7s0h4HsR7OxrFfVX0LBoL0hXiolMCCflVCz+GIawyRyFPVnx14llVP0fv3 UuiThiF6X9Zi3Id2x7NlbH5zWzCRPD/a+GwCCzKbldqDHn23jGHyY6BZ8fgQspKTZPHT YzJgItSU2olU4j573By9r4B8bgJOVqBs4ZypdwpWiCbFko9VBHGiDAoqJ/vPiM1teivd Gvdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=iACfiWeWKd/Z5WO9/BaeMkYTLRwpjoLt0A1bTfApxq4=; b=pIVDxLXkp8/56jI2dkWhvYqS+wrR/+VdPYc3yYNg3zI0zHhX5orX1lRVCyMyGywmpi PLqsgxZkQnkmVmbsxChPGQ54cD9Tvk49btYn99H3nDVHGOfaqIvBxyYc15p7s9uoM977 3qyYJJ+fAiU3SKSSM2VikMyWp8OBN25GbqtgYGLvF62S9Zo9fznDG+BgbSm4OoV92ldk qFx3MYC5XUXKv0I4DMKqwSCRz5r+5p6/0Xi5eSrzraBWvKtlks1qFfklCUM/Hg0QED0e R4PA3xNPZBGKf8OOW4jUJA35sKREznz3PZZRQ7NjxpXvxuUM2TSnzmUtihGKwoVUyBmN cQPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=Br18sfkx; spf=pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-omap-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id dk11si13340421ejb.97.2019.11.05.06.02.06; Tue, 05 Nov 2019 06:02:06 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=Br18sfkx; spf=pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-omap-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389446AbfKEOCF (ORCPT + 5 others); Tue, 5 Nov 2019 09:02:05 -0500 Received: from lelv0142.ext.ti.com ([198.47.23.249]:45336 "EHLO lelv0142.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389441AbfKEOCE (ORCPT ); Tue, 5 Nov 2019 09:02:04 -0500 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id xA5E20lW101234; Tue, 5 Nov 2019 08:02:00 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1572962520; bh=iACfiWeWKd/Z5WO9/BaeMkYTLRwpjoLt0A1bTfApxq4=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=Br18sfkx4J8seB05ET0j/EfpwxVInHNRCznznjYj2zC954v+5wp4jQmS+uMw5QJjc fpThW/z4CV13vPk4LlaPQjx/lPgS6MlX9vcYg8DIr8vG5p/VhFC/vdNcD65Fm+inH6 8x4GCc6lxd7uUcaP6AF5MaQzfz8KzVKbtBaUOe7E= Received: from DFLE115.ent.ti.com (dfle115.ent.ti.com [10.64.6.36]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id xA5E20AM008358 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 5 Nov 2019 08:02:00 -0600 Received: from DFLE108.ent.ti.com (10.64.6.29) by DFLE115.ent.ti.com (10.64.6.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3; Tue, 5 Nov 2019 08:01:45 -0600 Received: from fllv0040.itg.ti.com (10.64.41.20) by DFLE108.ent.ti.com (10.64.6.29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3 via Frontend Transport; Tue, 5 Nov 2019 08:01:45 -0600 Received: from sokoban.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id xA5E1FFx068289; Tue, 5 Nov 2019 08:01:58 -0600 From: Tero Kristo To: , , CC: , Subject: [PATCHv2 20/22] crypto: omap-des: avoid unnecessary spam with bad cryptlen Date: Tue, 5 Nov 2019 16:01:09 +0200 Message-ID: <20191105140111.20285-21-t-kristo@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191105140111.20285-1-t-kristo@ti.com> References: <20191105140111.20285-1-t-kristo@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org Remove the error print in this case, and just return the error. Signed-off-by: Tero Kristo --- drivers/crypto/omap-des.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) -- 2.17.1 -- Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki diff --git a/drivers/crypto/omap-des.c b/drivers/crypto/omap-des.c index 2e3ecb860e27..31fc9300b990 100644 --- a/drivers/crypto/omap-des.c +++ b/drivers/crypto/omap-des.c @@ -637,10 +637,8 @@ static int omap_des_crypt(struct skcipher_request *req, unsigned long mode) !!(mode & FLAGS_ENCRYPT), !!(mode & FLAGS_CBC)); - if (!IS_ALIGNED(req->cryptlen, DES_BLOCK_SIZE)) { - pr_err("request size is not exact amount of DES blocks\n"); + if (!IS_ALIGNED(req->cryptlen, DES_BLOCK_SIZE)) return -EINVAL; - } dd = omap_des_find_dev(ctx); if (!dd)