[PATCH] [media] davinci-vpfe: Fix retcode check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxx>
Signed-off-by: Andrey Utkin <andrey.krieger.utkin@xxxxxxxxx>
---
 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

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux