From patchwork Fri May 22 06:03:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 187140 Delivered-To: patch@linaro.org Received: by 2002:a92:5b0a:0:0:0:0:0 with SMTP id p10csp2208361ilb; Thu, 21 May 2020 23:04:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxIECXyhau02KRRJBDx//qEjKgWj/DMw911feDgIuESV8rSO1b0ZQXvw9EOk1GpHz2E6wDZ X-Received: by 2002:a63:7c5a:: with SMTP id l26mr11433852pgn.397.1590127456248; Thu, 21 May 2020 23:04:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590127456; cv=none; d=google.com; s=arc-20160816; b=0DyZEDHVzSqQS0NwLOTdIKzZYFnxl9w1qUor4eiVmWoza2QsX0laPm8qVp8xLc75LJ 8sUE93YGWO/y1qNW/imrSTohuCJYS68TXQyzcorVuyJNS2nr+mIda7BArsOzS7s1PVua WeMbHz1zeK+VTVJYlrxAyLNpQkTolyWxvrH9uo/sqdxHLOSTuXo+DW5snmWShVBKB+y+ 1LN0hZz0/r3HB35LJfOWv90ClGFu7V6oOE3yiOnskOd5cwgIB2PkpsHssXfOOodtrRqK oaSl0WB+YiWlWMsF1pPC95iDRBBv53x4M/j0ROq71Qvirz5VJo2cz7DqEp285seEzkXj oEuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:references:cms-type:message-id:date:subject:to :from:dkim-signature:dkim-filter:delivered-to; bh=tAro5EZZbK3u05Y/dKq2ljj7iErkxlQ0gX7JyRWBoXY=; b=m5jpsa3E7YsIfGeZj5MRVyK0XaVKGcvakF0vqBlMULPpEm5IhkyZ5l2f39flIK11JT z3i3tg6YBk7XlCzBoNLwPYBYQWnft7PlAXtC0kEtsg2OUJdO7+jCzglX+3X0tA/vsUUk oVQP8gxzXhga6v92g45B0Ku+y4BquGfvnz2lC87ls5+1pY5+59AaHyoxlAHJQHNLbF4e dYppUmS3ECS94Fz0IXiS0ZOhDCh7qEG7AlEBNifkLMOb94wz7T0DDp6zvWPW4cM34AtN 00WJACtxssfmi22EJiBMfj5m8DBuA7inXHN7Q07P4eKk1wA7CyWQcDoO4dODKFxMyGh0 l0yQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@samsung.com header.s=mail20170921 header.b=lypVMFm+; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id f11si5974740pgv.546.2020.05.21.23.04.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 May 2020 23:04:16 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@samsung.com header.s=mail20170921 header.b=lypVMFm+; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8718A6E0E7; Fri, 22 May 2020 06:04:13 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) by gabe.freedesktop.org (Postfix) with ESMTPS id 51B726E0E7 for ; Fri, 22 May 2020 06:04:12 +0000 (UTC) Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20200522060410euoutp01aeaf9640f418ada5d6df2b86fae38d07~RRH2z55EY1372913729euoutp01E for ; Fri, 22 May 2020 06:04:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20200522060410euoutp01aeaf9640f418ada5d6df2b86fae38d07~RRH2z55EY1372913729euoutp01E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1590127450; bh=92IO08N+pw0wmAN078aoUzG3I8fLWWm/tioApQecsJU=; h=From:To:Cc:Subject:Date:References:From; b=lypVMFm+1qJj5C1ccuC64iJK+CmwV+eFK3nKgGOtxAbmbTziCdm7h/WxYm5J+39jE ju0SPTPN6KhTX0ifVCLgRFdQTbmSA2NZnndWIRlUzbnmDCTGTdB4WzY1Otx7CENksh 3sf2gVwqnRHVosD75RBPlRWhRDqyfGcs6xBW3bN4= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20200522060409eucas1p1a6e6352e8abaf393769afcaa76551ee3~RRH2i49oy2554125541eucas1p1G; Fri, 22 May 2020 06:04:09 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id FE.AA.61286.95B67CE5; Fri, 22 May 2020 07:04:09 +0100 (BST) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20200522060409eucas1p1cf023d2be5b8c30da32354262a829de0~RRH2NyU5w2271722717eucas1p1U; Fri, 22 May 2020 06:04:09 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20200522060409eusmtrp11e776683e254955720bb38a6f9d2258e~RRH2NC1Hk2001720017eusmtrp1H; Fri, 22 May 2020 06:04:09 +0000 (GMT) X-AuditID: cbfec7f2-ef1ff7000001ef66-3d-5ec76b5971f7 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id D1.B0.08375.95B67CE5; Fri, 22 May 2020 07:04:09 +0100 (BST) Received: from AMDC2765.digital.local (unknown [106.120.51.73]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20200522060409eusmtip1232ed069ab72b3bbe1a72cd76c5fed33~RRH11mpGC2453524535eusmtip1b; Fri, 22 May 2020 06:04:09 +0000 (GMT) From: Marek Szyprowski To: dri-devel@lists.freedesktop.org, linux-samsung-soc@vger.kernel.org Subject: [PATCH] drm/exynos: Properly propagate return value in drm_iommu_attach_device() Date: Fri, 22 May 2020 08:03:56 +0200 Message-Id: <20200522060356.25153-1-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.17.1 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrMIsWRmVeSWpSXmKPExsWy7djP87qR2cfjDC7u1bO4te4cq8XGGetZ La58fc9mMen+BBaLGef3MVmsPXKX3WLG5JdsDuwe97uPM3n0bVnF6PF5k1wAcxSXTUpqTmZZ apG+XQJXxszdM5gLbnBUnJqf2sC4gr2LkZNDQsBEYv7dNyxdjFwcQgIrGCVmfF/MBpIQEvjC KLFliTdE4jOjxLRv65hgOg6umMkEkVjOKLHow3QmuI7G/5YgNpuAoUTX2y6wSSICbhJNh2ey gjQwC1xnlPj2YxHYbmGBaIlFR5cDFXFwsAioSly76AcS5hWwldh36hUzxDJ5idUbDjCD9EoI nGCTeNf0DirhIrFh33EoW1ji1fEtUP/ISJye3MMC0dDMKPHw3Fp2CKeHUeJy0wxGiCpriTvn foFtZhbQlFi/Sx8i7CixaGIbK0hYQoBP4sZbQZAwM5A5adt0Zogwr0RHmxBEtZrErOPr4NYe vHAJ6hwPiSdTmqFhEitxf8kNtgmMc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Jv48JnfN6+bqSNW82199Qi2q8tUjqgHmE376w fO1k9ysSAseNZ1yIDlj7prH72xrvJVvC1y+aNHehEktxRqKhFnNRcSIAv818AE0CAAA= X-CMS-MailID: 20200522060409eucas1p1cf023d2be5b8c30da32354262a829de0 X-Msg-Generator: CA X-RootMTR: 20200522060409eucas1p1cf023d2be5b8c30da32354262a829de0 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20200522060409eucas1p1cf023d2be5b8c30da32354262a829de0 References: X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrzej Hajda , Bartlomiej Zolnierkiewicz , Seung-Woo Kim , Marek Szyprowski MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Propagate the proper error codes from the called functions instead of unconditionally returning 0. Reported-by: kbuild test robot Signed-off-by: Marek Szyprowski --- drivers/gpu/drm/exynos/exynos_drm_dma.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.17.1 _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel diff --git a/drivers/gpu/drm/exynos/exynos_drm_dma.c b/drivers/gpu/drm/exynos/exynos_drm_dma.c index d3fe6c1e6688..5887f7f52f96 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_dma.c +++ b/drivers/gpu/drm/exynos/exynos_drm_dma.c @@ -44,7 +44,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", @@ -69,7 +69,7 @@ static int drm_iommu_attach_device(struct drm_device *drm_dev, ret = iommu_attach_device(priv->mapping, subdrv_dev); } - return 0; + return ret; } /*