Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp661524ybt; Wed, 8 Jul 2020 08:42:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwkKGvuZ9UYzz/aJec3sELkaCgdlr8WirIabG+f8YdptYuWeVGsL7bcRWPW/XoZg+SoCn66 X-Received: by 2002:a17:906:23e9:: with SMTP id j9mr40798945ejg.107.1594222926312; Wed, 08 Jul 2020 08:42:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594222926; cv=none; d=google.com; s=arc-20160816; b=O4lV9jAmBl5ZWSuaRBh2e2mCN1G2VwY+dwZDR2dJvjXjh19EL7hkPGZcCtVbRg0ora 5QcQCoJIkH10BwmLSi8me3D4GMatTY8j/XQjT1n2c6aBB/NUA8DYzjAphLfoxWuz0FMf R3Yflf3Dx5kLULBoPhbbYC4yWmapx8tKaEFBkl+CymSPPyeJxULggN6e7WO8eeW2J3WI nQLDU/VBFSCpK8nPNmApk02tjZ5HGgQJgZRi/ZCiXmO0BuAN92Xs2HSuRxVBnQE8aDFK Cpz1JZQazAMSqhbktfYG1oWM29Txu0eLeKEdS9pGnO6A6aj26/BFZULBvd2XZnFKyDnq MucQ== 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=OMmCnXHmN2ILvEh5wgtfRmO4LUerlNvY62aSFBd3j8g=; b=LpCdcfDtyXykZZqmLkYNyr5Z1mM4/qDGvAwCJvM2QJGRkt20+a8MUnAGWnsJCWl8xg QBLyZtgD1ozDwt+SVQ7Q22X7si3LRIGbNG1iTWBJDvZw8HQZ44CQ7x5GHuNgKbIOSQf2 HEIO6r431pd9eG/wDizcbxPoKXjVZfFixcZ7xw2t8EEG+xNxI8nTSNErJWPQUlItLwDf lXkJ1F7aNFX1t888syBkEDZa84EjfZuGshfCzX3ESBGL8w1s70X6TRffE5w+bZ8bljG8 qazhSdQw6KGeF95ZQB44p5CIYsI2hRv0MX7vh9zIu/uQ6zKCUJC/Tkj+WB8JK9ymYPF0 5AlQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=aIVCD5gY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id du15si142666ejc.591.2020.07.08.08.41.43; Wed, 08 Jul 2020 08:42:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=aIVCD5gY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730392AbgGHPlY (ORCPT + 99 others); Wed, 8 Jul 2020 11:41:24 -0400 Received: from mail.kernel.org ([198.145.29.99]:47748 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730386AbgGHPlX (ORCPT ); Wed, 8 Jul 2020 11:41:23 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 006CC20786; Wed, 8 Jul 2020 15:41:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1594222882; bh=B4KbhpoltGExd208/4xHgN1aUeY0aanpA2UIDqaA8Jk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aIVCD5gYfxPdcaJsnAEHtOOb2xq53ugXXr2BODQBSt+AXrX6jS7ShY9kZBcARtfvw 651RMymOudCIP+Vq5uQuqdrN8jzAOrXSbvM0X8UMXkGpZ9Uzf4lANE777KslWl2nP6 AaJHDnETAjLVJrmhBrPtT+CI9u+mu9xZk9/hZARQ= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Marek Szyprowski , kbuild test robot , Inki Dae , Sasha Levin , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org Subject: [PATCH AUTOSEL 5.7 04/30] drm/exynos: Properly propagate return value in drm_iommu_attach_device() Date: Wed, 8 Jul 2020 11:40:50 -0400 Message-Id: <20200708154116.3199728-4-sashal@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200708154116.3199728-1-sashal@kernel.org> References: <20200708154116.3199728-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Marek Szyprowski [ Upstream commit b9c633882de4601015625f9136f248e9abca8a7a ] Propagate the proper error codes from the called functions instead of unconditionally returning 0. Reported-by: kbuild test robot Signed-off-by: Marek Szyprowski Merge conflict so merged it manually. Signed-off-by: Inki Dae Signed-off-by: Sasha Levin --- drivers/gpu/drm/exynos/exynos_drm_dma.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_dma.c b/drivers/gpu/drm/exynos/exynos_drm_dma.c index 619f81435c1b2..58b89ec11b0eb 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_dma.c +++ b/drivers/gpu/drm/exynos/exynos_drm_dma.c @@ -61,7 +61,7 @@ static int drm_iommu_attach_device(struct drm_device *drm_dev, struct device *subdrv_dev, void **dma_priv) { struct exynos_drm_private *priv = drm_dev->dev_private; - int ret; + int ret = 0; if (get_dma_ops(priv->dma_dev) != get_dma_ops(subdrv_dev)) { DRM_DEV_ERROR(subdrv_dev, "Device %s lacks support for IOMMU\n", @@ -92,7 +92,7 @@ static int drm_iommu_attach_device(struct drm_device *drm_dev, if (ret) clear_dma_max_seg_size(subdrv_dev); - return 0; + return ret; } /* -- 2.25.1