lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20200807083548.204360-2-dwlsalmeida@gmail.com>
Date:   Fri,  7 Aug 2020 05:35:29 -0300
From:   "Daniel W. S. Almeida" <dwlsalmeida@...il.com>
To:     Kyungmin Park <kyungmin.park@...sung.com>,
        Sylwester Nawrocki <s.nawrocki@...sung.com>,
        Kukjin Kim <kgene@...nel.org>,
        Krzysztof Kozlowski <krzk@...nel.org>
Cc:     skhan@...uxfoundation.org,
        "Daniel W. S. Almeida" <dwlsalmeida@...il.com>,
        Mauro Carvalho Chehab <mchehab@...nel.org>,
        linux-media@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        linux-samsung-soc@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH 02/20] media: exynos4-is: media-dev.c: use PTR_ERR_OR_ZERO

From: "Daniel W. S. Almeida" <dwlsalmeida@...il.com>

Fixes the following coccinelle report:

drivers/media/platform/exynos4-is/media-dev.c:1273:1-3:
WARNING: PTR_ERR_OR_ZERO can be used

By using PTR_ERR_OR_ZERO in place of the existing logic.

Found using - Coccinelle (http://coccinelle.lip6.fr)

Signed-off-by: Daniel W. S. Almeida <dwlsalmeida@...il.com>
---
 drivers/media/platform/exynos4-is/media-dev.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/media/platform/exynos4-is/media-dev.c b/drivers/media/platform/exynos4-is/media-dev.c
index 16dd660137a8..9346b08931e2 100644
--- a/drivers/media/platform/exynos4-is/media-dev.c
+++ b/drivers/media/platform/exynos4-is/media-dev.c
@@ -1270,10 +1270,8 @@ static int fimc_md_get_pinctrl(struct fimc_md *fmd)
 
 	pctl->state_idle = pinctrl_lookup_state(pctl->pinctrl,
 					PINCTRL_STATE_IDLE);
-	if (IS_ERR(pctl->state_idle))
-		return PTR_ERR(pctl->state_idle);
 
-	return 0;
+	return PTR_ERR_OR_ZERO(pctl->state_idle);
 }
 
 static int cam_clk_prepare(struct clk_hw *hw)
-- 
2.28.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ