From d51f9057f8dd897ddf4e25b0a4d07750e62d75dc Mon Sep 17 00:00:00 2001 From: "Isaac J. Manjarres" Date: Tue, 28 Jan 2020 18:11:06 -0800 Subject: [PATCH] iommu: iommu-debug: Fix return code for iommu_debug_dma_unmap_write iommu_debug_dma_unmap_write() returns 0 instead of an error code when the command passed to the dma_unmap debugfs node is not in the expected format. Change-Id: Ie4f5dfa4423edc539fec9c38554e97c79fccc6c3 Signed-off-by: Isaac J. Manjarres --- drivers/iommu/iommu-debug.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/iommu/iommu-debug.c b/drivers/iommu/iommu-debug.c index f4994c041b8b..c7491992ec90 100644 --- a/drivers/iommu/iommu-debug.c +++ b/drivers/iommu/iommu-debug.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0-only /* - * Copyright (c) 2015-2019, The Linux Foundation. All rights reserved. + * Copyright (c) 2015-2020, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -2023,7 +2023,7 @@ out: invalid_format: pr_err_ratelimited("Invalid format. Expected: iova,len, dma attr\n"); - return retval; + return -EINVAL; } static const struct file_operations iommu_debug_dma_unmap_fops = {