drm_open_helper() from drm_fops.c had a missing mutex_unlock in a error
path.
This was caught by smatch (http://repo.or.cz/w/smatch.git/). Compile
tested.
regards,
dan carpenter
Signed-off-by: Dan Carpenter
--- orig/drivers/gpu/drm/drm_fops.c 2009-03-26 23:28:21.0 +0300
I moved the fence dereference after the check. rdev is fence->rdev so I
moved the rdev deference as well.
This was found by static analysis so I can't say whether fence is ever
actually null but it's a good thing to do either way.
regards,
dan carpenter
Signed-off-by:
I moved the allocation until after the check for (si->totalhigh == 0).
regards,
dan carpenter
Signed-off-by: Dan Carpenter
--- orig/drivers/gpu/drm/ttm/ttm_memory.c 2009-11-28 07:05:54.0
+0200
+++ devel/drivers/gpu/drm/ttm/ttm_memory.c 2009-11-28 07:07:52.0
+0
The check should be >= instead of > or we could potentially
go past the end of the array.
Found by a smatch static checker and compile tested only.
Signed-off-by: Dan Carpenter
--- orig/drivers/gpu/drm/via/via_video.c2009-12-27 13:19:36.0
+0200
+++ devel/drivers/gpu/d
uct_mutex);
114 dev_priv->mm.suspended = 0;
We do set the dev_priv->mm.suspended here but it's too late.
Not sure the fix though...
regards,
dan carpenter
--
This SF.Net email is sponsor
We should free "params" before returning.
Signed-off-by: Dan Carpenter
diff --git a/drivers/gpu/drm/i915/intel_overlay.c
b/drivers/gpu/drm/i915/intel_overlay.c
index d355d1d..60595fc 100644
--- a/drivers/gpu/drm/i915/intel_overlay.c
+++ b/drivers/gpu/drm/i915/intel_overlay.c
@
} else
557 error =
abs(current_freq - freq);
regards,
dan carpenter
--
Download IntelĀ® Parallel Studio Eval
Try the new software tools for y
"fx->lock" is used as the index in "dev_priv->decoder_queue[fx->lock]"
which is an array of "VIA_NR_XVMC_LOCKS" elements.
Signed-off-by: Dan Carpenter
diff --git a/drivers/gpu/drm/via/via_video.c b/drivers/gpu/drm/via/via_video.c
index 6ec04ac..6
This change makes the array larger, "MAX_SUPPORTED_TV_TIMING_V1_2" is 3
and the original size "MAX_SUPPORTED_TV_TIMING" is 2.
Also there were checks that were off by one.
Signed-off-by: Dan Carpenter
---
Compile tested only. Changing the array size seemed like the right
t detailed_data_string str;
struct detailed_data_monitor_range range;
struct detailed_data_wpindex color;
struct std_timing timings[5];
^
struct cvt_timing cvt[4];
} data;
} __attribute_
"agpmem" is never NULL here.
Signed-off-by: Dan Carpenter
diff --git a/drivers/gpu/drm/drm_memory.c b/drivers/gpu/drm/drm_memory.c
index e4865f9..7732268 100644
--- a/drivers/gpu/drm/drm_memory.c
+++ b/drivers/gpu/drm/drm_memory.c
@@ -77,7 +77,7 @@ static void *agp_remap(unsigned l
plained about that because "i" was potentially passed the end
of the array. Which makes sense if we should be using "j" there.
I also thought that we should remove the files for &connector_attrs_opt1
but to do that I had to add separate iterators for &connector_attrs and
&
On Sun, Mar 28, 2010 at 10:55:14PM +0200, Andi Kleen wrote:
> , Dan Carpenter wrote:
>>
>> In the original code we used "j" as an iterator but we used "i" as an
>> index.
>>
>> - for (j = 0; j< i; j++)
>&g
} else
565 error = abs(current_freq - freq);
regards,
dan carpenter
--
Download IntelĀ® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactiv
This is an unlikely memory leak, but we may as well fix it. It's easy
to fix and every static checker will complain if we don't.
Signed-off-by: Dan Carpenter
diff --git a/drivers/gpu/drm/radeon/atom.c b/drivers/gpu/drm/radeon/atom.c
index 247f8ee..58845e0 100644
--- a/drivers/gpu/
In the original code there was a typo and we called kfree(pgraph->ctxprog)
two times instead of kfree(pgraph->ctxvals);
Also it's OK to pass NULL variables to kfree(). checkpatch.pl complains
about this so I removed the checks.
Signed-off-by: Dan Carpenter
diff --git a/driv
If "gpio->line" is 32 then "nv50_gpio_reg[gpio->line >> 3]" reads past the
end of the array.
Signed-off-by: Dan Carpenter
diff --git a/drivers/gpu/drm/nouveau/nv50_gpio.c
b/drivers/gpu/drm/nouveau/nv50_gpio.c
index c61782b..bb47ad7 100644
--- a/drivers/gpu/drm/n
The "encoder" variable can never be null because it is used as loop
cursor in a list_for_each_entry() loop.
Signed-off-by: Dan Carpenter
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index f6299bb..950dc8d 100644
--- a/drivers/gpu/drm/i915/intel_
The "connector" variable is used as the cursor in a
list_for_each_entry() and it's always non-null so we don't need to check
it.
Signed-off-by: Dan Carpenter
diff --git a/drivers/gpu/drm/i915/intel_sdvo.c
b/drivers/gpu/drm/i915/intel_sdvo.c
index 42ceb15..179d146 100644
-
Ping. This off-by-one overflow is still there in -next.
I'm not sure how to fix it because both the declaraion and the
use in add_detailed_modes() look deliberate.
regards,
dan carpenter
On Sun, Mar 28, 2010 at 02:25:58PM +0300, Dan Carpenter wrote:
> Hi list, :)
>
> Just goin
There was a missing mutex_unlock(&dev->struct_mutex) on this error path.
Signed-off-by: Dan Carpenter
---
I thought Jiri sent this patch earlier but a google search for "stanse
struct_mutex i965_reset" didn't find any patches, so I'm resending.
diff --git a/driver
The original code dereferences "fb_helper_conn" before verifying that
it's non-null.
Signed-off-by: Dan Carpenter
---
It's never null here actually. I could send a patch to remove the check
instead if that's prefered.
diff --git a/drivers/gpu/drm/drm_fb_h
m == num_est3_modes is one past the end of the est3_modes[].
Signed-off-by: Dan Carpenter
diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
index 7188674..46447b0 100644
--- a/drivers/gpu/drm/drm_edid.c
+++ b/drivers/gpu/drm/drm_edid.c
@@ -1383,7 +1383,7 @@ drm_est3_modes
0_HDMI_BLOCK1 ? 0 : 1] = false;
^^
offset is 8 bits so this condition is always false.
+ radeon_irq_set(rdev);
+
regards,
up, because timings[] is declared inside
a union and increasing the number of elements here doesn't change the
overall size of the union.
Signed-off-by: Dan Carpenter
---
This patch applies to drm-next.
diff --git a/include/drm/drm_edid.h b/include/drm/drm_edid.h
index d33c3e0..39e2cc5 1
25 matches
Mail list logo