From patchwork Tue Nov 5 12:37:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tero Kristo X-Patchwork-Id: 178494 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp699242ilf; Tue, 5 Nov 2019 04:38:49 -0800 (PST) X-Google-Smtp-Source: APXvYqzK78QuUaSzcloy0kl8SODtn4G4GCmpGImnn7XmA5UoLTdYIH6pgg5KBkCe61U35l/c0rK2 X-Received: by 2002:a17:906:66d2:: with SMTP id k18mr28737820ejp.278.1572957529190; Tue, 05 Nov 2019 04:38:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1572957529; cv=none; d=google.com; s=arc-20160816; b=n6SkAZEJ6ESsaIrJhl9abLkJ0A+w2HIBKlTpkhS2sEIv75Tdj9WIHmisaP0GPkLec7 ylzKetvMyzmiFHgBdPGPmXaNS2TBV6cRqLOsXIzONmzQpoLvh+rVs6ClK7N+jGkp+fNk L2vUFZ+ZWtZFiEV/QgybAXkCfz7r3BZ8fVVt+Oy0vErlnknnlttnJxypHdhupQN1w7vV 6CBjigQ8axXipC81+E3ZmIWmNaOm/jRgRaBJZhXnpBJgK6NrT6y3rkKlt51HppfREphp 1/1GcR1GyRSwihr/YmYyplkc/JUcLbYwjq0GtK2a7wvHoEuAQerKYbNC5EQKWrjEgMaQ Fnlw== 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=CVS2IDzTtGCfSD9+s5z6NmfIUOK9IhJymoncHHPAjvY=; b=j1PI8IdrWBxj98sEjeTlOuSvqOJIMXcFkL9SRkNutRvxkAR17oj/PA3Zi9SjQJoksf 21KKH8j2BWEcw2tqa570utyIqNbfqGaFJ/fO466rTWfFafBBmRjPM/vMRAsDXNUhOxtw 1ujeP0+PFTPYkF3h8ayjR8S3truz9h1E2BHOnvBEkZE5WkpQ/PzhM9q9y+bDVAmex6vR mplQOuBFjEPc0njeoRrgzzA/vnydE70hMsmfaYXkav+vUAhq7zy9KsACFQ6ZIsJO3uCR UtAz+OeB0myFS4HFsS2uu7dlVr8u7FqFaU4o7NxKU+IHVvhHO7FszbQLqVCPew0n5USo B8qA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=G6R96ECl; 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 w56si9521209eda.376.2019.11.05.04.38.49; Tue, 05 Nov 2019 04:38:49 -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=G6R96ECl; 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 S2388808AbfKEMis (ORCPT + 5 others); Tue, 5 Nov 2019 07:38:48 -0500 Received: from fllv0016.ext.ti.com ([198.47.19.142]:34446 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388494AbfKEMis (ORCPT ); Tue, 5 Nov 2019 07:38:48 -0500 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id xA5CchvY021814; Tue, 5 Nov 2019 06:38:43 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1572957523; bh=CVS2IDzTtGCfSD9+s5z6NmfIUOK9IhJymoncHHPAjvY=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=G6R96EClAt4JH+OFY4JQXbYgzUQWG4H6uGxbnQh64F89DMg8/2LFfAiJAG0WRmkbE MOHG+6uLxOvN5hnNpUoCyEyMslsyQGyoHBnJw88sh59xdLZd4XLO43iX6Adph6AneB YB/nVdK9g9tdL2mkBzdYB+N2qIykxD5autbYOj6g= Received: from DFLE113.ent.ti.com (dfle113.ent.ti.com [10.64.6.34]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id xA5Cchp9088156 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 5 Nov 2019 06:38:43 -0600 Received: from DFLE103.ent.ti.com (10.64.6.24) by DFLE113.ent.ti.com (10.64.6.34) 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 06:38:00 -0600 Received: from fllv0039.itg.ti.com (10.64.41.19) by DFLE103.ent.ti.com (10.64.6.24) 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 06:38:00 -0600 Received: from sokoban.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id xA5Cc6d1117093; Tue, 5 Nov 2019 06:38:13 -0600 From: Tero Kristo To: , , CC: , Subject: [PATCH 4/6] crypto: omap-des: avoid unnecessary spam with bad cryptlen Date: Tue, 5 Nov 2019 14:37:57 +0200 Message-ID: <20191105123759.25053-5-t-kristo@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191105123759.25053-1-t-kristo@ti.com> References: <20191105123759.25053-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 ea82d55ea8c3..d1d839164048 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)