[PATCH] gpu: drm: radeon: r600_cp.c: Cleaning up uninitialized variables

Rickard Strandqvist rickard_strandqvist at spectrumdigital.se
Sat May 31 16:10:05 PDT 2014


There is a risk that the variable will be used without being initialized.

This was largely found by using a static code analysis program called cppcheck.

Signed-off-by: Rickard Strandqvist <rickard_strandqvist at spectrumdigital.se>
---
 drivers/gpu/drm/radeon/r600_cp.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/radeon/r600_cp.c b/drivers/gpu/drm/radeon/r600_cp.c
index 8c9b7e2..0770ad6 100644
--- a/drivers/gpu/drm/radeon/r600_cp.c
+++ b/drivers/gpu/drm/radeon/r600_cp.c
@@ -2615,7 +2615,7 @@ int r600_cs_legacy_ioctl(struct drm_device *dev, void *data, struct drm_file *fp
 	struct drm_radeon_cs *cs = data;
 	struct drm_buf *buf;
 	unsigned family;
-	int l, r = 0;
+	int l = 0, r = 0;
 	u32 *ib, cs_id = 0;
 
 	if (dev_priv == NULL) {
-- 
1.7.10.4



More information about the dri-devel mailing list