public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] [media] davinci-vpfe: Fix retcode check
@ 2014-07-08 14:08 Andrey Utkin
  2014-07-08 14:32 ` Levente Kurusa
  0 siblings, 1 reply; 6+ messages in thread
From: Andrey Utkin @ 2014-07-08 14:08 UTC (permalink / raw)
  To: linux-kernel, devel, linux-media
  Cc: gregkh, m.chehab, prabhakar.csengg, josh, levex, archanakumari959,
	lisa, Andrey Utkin

Use signed type to check correctly for negative error code. The issue
was reported with static analyser:

[linux-3.13/drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.c:270]:
(style) A pointer can not be negative so it is either pointless or an
error to check if it is.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=69071
Reported-by: David Binderman <dcb314@hotmail.com>
Signed-off-by: Andrey Utkin <andrey.krieger.utkin@gmail.com>
---
 drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.c b/drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.c
index b2daf5e..e326032 100644
--- a/drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.c
+++ b/drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.c
@@ -254,7 +254,7 @@ int config_ipipe_hw(struct vpfe_ipipe_device *ipipe)
 	void __iomem *ipipe_base = ipipe->base_addr;
 	struct v4l2_mbus_framefmt *outformat;
 	u32 color_pat;
-	u32 ipipe_mode;
+	int ipipe_mode;
 	u32 data_path;
 
 	/* enable clock to IPIPE */
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 6+ messages in thread
* [PATCH] [media] davinci-vpfe: Fix retcode check
@ 2014-07-05  1:31 Andrey Utkin
  0 siblings, 0 replies; 6+ messages in thread
From: Andrey Utkin @ 2014-07-05  1:31 UTC (permalink / raw)
  To: linux-media, linux-kernel, kernel-janitors; +Cc: Andrey Utkin

See https://bugzilla.kernel.org/show_bug.cgi?id=69071
---8<---
Use signed type to check correctly for negative error code

Reported-by: David Binderman <dcb314@hotmail.com>
Signed-off-by: Andrey Utkin <andrey.krieger.utkin@gmail.com>
---
 drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.c b/drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.c
index b2daf5e..e326032 100644
--- a/drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.c
+++ b/drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.c
@@ -254,7 +254,7 @@ int config_ipipe_hw(struct vpfe_ipipe_device *ipipe)
 	void __iomem *ipipe_base = ipipe->base_addr;
 	struct v4l2_mbus_framefmt *outformat;
 	u32 color_pat;
-	u32 ipipe_mode;
+	int ipipe_mode;
 	u32 data_path;
 
 	/* enable clock to IPIPE */
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-07-08 15:42 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-08 14:08 [PATCH] [media] davinci-vpfe: Fix retcode check Andrey Utkin
2014-07-08 14:32 ` Levente Kurusa
2014-07-08 14:58   ` Andrey Utkin
2014-07-08 15:41     ` Prabhakar Lad
2014-07-08 15:11   ` Dan Carpenter
  -- strict thread matches above, loose matches on Subject: below --
2014-07-05  1:31 Andrey Utkin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox