i915: Fix uninitialized variable err
Subsystems (3)
PATCH 1/1 i915: Fix uninitialized variable err
From: Colin Ian King <[email protected]>
In the case where !sg_dma_len(sgl) breaks out of the do-while loop on the first iteration, error variable err has not been assigned any value and will contain garbage. Fix this by ensuring err is initialized to zero.
Addresses-Coverity: ("Uninitialized scalar variable")
--- drivers/gpu/drm/i915/i915_mm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/i915_mm.c +1 -1
@@ -47,7 +47,7 @@ int remap_io_sg(struct vm_area_struct *vma, struct scatterlist *sgl, resource_size_t iobase) {unsigned long pfn, len, remapped =0 ; -int err; +int err =0 ;/* We rely on prevalidation of the io-mapping to skip track_pfn(). */ GEM_BUG_ON ((vma->vm_flags &EXPECTED_FLAGS ) !=EXPECTED_FLAGS );
Signature · 6 lines
2.30.2 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Patchwork
CI[Intel-gfx] ✗ Fi.CI.BUILD: failure for i915: Fix uninitialized variable err
== Series Details ==
== Series Details ==
Series: i915: Fix uninitialized variable err
URL : https://patchwork.freedesktop.org/series/88545/
State : failure
== Summary ==
Applying: i915: Fix uninitialized variable err
Using index info to reconstruct a base tree...
M drivers/gpu/drm/i915/i915_mm.c
Falling back to patching base and 3-way merge... Auto-merging drivers/gpu/drm/i915/i915_mm.c
CONFLICT (content): Merge conflict in drivers/gpu/drm/i915/i915_mm.c
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch Patch failed at 0001 i915: Fix uninitialized variable err When you have resolved this problem, run "git am --continue". If you prefer to skip this patch, run "git am --skip" instead. To restore the original branch and stop patching, run "git am --abort".
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx