Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp7516955imu; Tue, 22 Jan 2019 07:16:49 -0800 (PST) X-Google-Smtp-Source: ALg8bN7l9e2xwaAyVxBcZkouTI/z+dHquHa/+d4QYiIr6ytcF0s9O6usM4k/LBdQkTB5W7fJi5PS X-Received: by 2002:a65:6242:: with SMTP id q2mr1295785pgv.245.1548170209889; Tue, 22 Jan 2019 07:16:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548170209; cv=none; d=google.com; s=arc-20160816; b=VnQMMTs64LUQN0zQNcZROXZu3DyTWmz/Atwarx13lLz/GpbH0xkJS1XM7pk177EELy jYQDIiwnZRdmRR0Iw9mj6eMSwWespTfxOJRFntejSCYt5oZZbePa/iaMXXeLFmxjRiJs 55ccLFkAYQUsTVG6LQ0/nNCxC/GLKapGpkcx/hXRXd7RafAIa8oJ3eMaouZFIfoQjvDB Cwoi9wcGjC/pKVK5+0dVlj3C3jvB3pcK3mZDHIBjTacXZofmh3CiiwaM8X+0bO412lUV xojYR7Z4lcvaGHnUfpIVyLatWg6dSD/mZpg8DtBym29kKo3rG1zhlQpqVsw0FlgW0sfu xXjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=8foR0qZ3OrRzvxWqnVllqhn2rJOgVz8iGMYXG3rhoQQ=; b=GVcrAG++xSIjNhXsQ1bReCTjN7F3AIRsNZsy/jWg1JxaZLG1EqALR5LO6e0g4D4pFT TMZ+TKGsVSrVFvxbQltftvQBbHmmC4Dcji89mVjxy2H0UBSQmeb4EhHaNryBZNXb9Kll K+Q+6fO3+Zb2LnoxSAOw7HIQc3z2xlUVaRUQNbYnt/eIcn+SYiF8fimvwObeoMH0uYG3 zUwsoyGaGnWrA4q2HVdN4lvDSwTEshIj86JtV1wOj5AtdtaAVkvmQy6CVkAmxSq5juwS M+bZQ/q0zmmTlp1YxCfrgSKysK2MZ4IMu8KCr0ZA2sDX0FiPmpj804HNt1Ij9mtT4E7A VomA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=thb4+7kl; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v184si14138130pgd.295.2019.01.22.07.16.34; Tue, 22 Jan 2019 07:16:49 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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=@kernel.org header.s=default header.b=thb4+7kl; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729338AbfAVPOz (ORCPT + 99 others); Tue, 22 Jan 2019 10:14:55 -0500 Received: from mail.kernel.org ([198.145.29.99]:54584 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729316AbfAVPOy (ORCPT ); Tue, 22 Jan 2019 10:14:54 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 31AE7217D4; Tue, 22 Jan 2019 15:14:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1548170092; bh=RBtl9EAyNklUXg2EmS5UmrMUyGB94Y/v1rinAVtvXL0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=thb4+7klLk/tbUGAFKXJbvEi9Ugc+4XLHxi8GC//bFBuZi4WORlSDHMp3pg/zlj7b +kxI6tO9Wb0BnCPkQFXmoHbFeEcgvZeNpNd2vvZtFVKr1y3HxVl6V3U2nZZkK1tm69 rgO4yymmwM+A43uwMG95YlWmazENRoL61GKB6d/c= From: Greg Kroah-Hartman To: Herbert Xu , David Miller Cc: linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org, Greg Kroah-Hartman , =?UTF-8?q?Horia=20Geant=C4=83?= , Aymen Sghaier Subject: [PATCH 7/7] crypto: caam: no need to check return value of debugfs_create functions Date: Tue, 22 Jan 2019 16:14:22 +0100 Message-Id: <20190122151422.14204-8-gregkh@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190122151422.14204-1-gregkh@linuxfoundation.org> References: <20190122151422.14204-1-gregkh@linuxfoundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: "Horia Geantă" Cc: Aymen Sghaier Cc: Herbert Xu Cc: "David S. Miller" Cc: linux-crypto@vger.kernel.org Signed-off-by: Greg Kroah-Hartman --- drivers/crypto/caam/ctrl.c | 21 ++++++--------------- drivers/crypto/caam/intern.h | 1 - 2 files changed, 6 insertions(+), 16 deletions(-) diff --git a/drivers/crypto/caam/ctrl.c b/drivers/crypto/caam/ctrl.c index 16bbc72f041a..87c13fb6028c 100644 --- a/drivers/crypto/caam/ctrl.c +++ b/drivers/crypto/caam/ctrl.c @@ -863,27 +863,18 @@ static int caam_probe(struct platform_device *pdev) /* Internal covering keys (useful in non-secure mode only) */ ctrlpriv->ctl_kek_wrap.data = (__force void *)&ctrlpriv->ctrl->kek[0]; ctrlpriv->ctl_kek_wrap.size = KEK_KEY_SIZE * sizeof(u32); - ctrlpriv->ctl_kek = debugfs_create_blob("kek", - S_IRUSR | - S_IRGRP | S_IROTH, - ctrlpriv->ctl, - &ctrlpriv->ctl_kek_wrap); + debugfs_create_blob("kek", S_IRUSR | S_IRGRP | S_IROTH, ctrlpriv->ctl, + &ctrlpriv->ctl_kek_wrap); ctrlpriv->ctl_tkek_wrap.data = (__force void *)&ctrlpriv->ctrl->tkek[0]; ctrlpriv->ctl_tkek_wrap.size = KEK_KEY_SIZE * sizeof(u32); - ctrlpriv->ctl_tkek = debugfs_create_blob("tkek", - S_IRUSR | - S_IRGRP | S_IROTH, - ctrlpriv->ctl, - &ctrlpriv->ctl_tkek_wrap); + debugfs_create_blob("tkek", S_IRUSR | S_IRGRP | S_IROTH, ctrlpriv->ctl, + &ctrlpriv->ctl_tkek_wrap); ctrlpriv->ctl_tdsk_wrap.data = (__force void *)&ctrlpriv->ctrl->tdsk[0]; ctrlpriv->ctl_tdsk_wrap.size = KEK_KEY_SIZE * sizeof(u32); - ctrlpriv->ctl_tdsk = debugfs_create_blob("tdsk", - S_IRUSR | - S_IRGRP | S_IROTH, - ctrlpriv->ctl, - &ctrlpriv->ctl_tdsk_wrap); + debugfs_create_blob("tdsk", S_IRUSR | S_IRGRP | S_IROTH, ctrlpriv->ctl, + &ctrlpriv->ctl_tdsk_wrap); #endif return 0; diff --git a/drivers/crypto/caam/intern.h b/drivers/crypto/caam/intern.h index babc78abd155..5869ad58d497 100644 --- a/drivers/crypto/caam/intern.h +++ b/drivers/crypto/caam/intern.h @@ -106,7 +106,6 @@ struct caam_drv_private { struct dentry *dfs_root; struct dentry *ctl; /* controller dir */ struct debugfs_blob_wrapper ctl_kek_wrap, ctl_tkek_wrap, ctl_tdsk_wrap; - struct dentry *ctl_kek, *ctl_tkek, *ctl_tdsk; #endif }; -- 2.20.1