artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4b1f2da
)
fix null dereference.
author
chl
<chl@openbsd.org>
Mon, 1 Sep 2008 17:50:15 +0000
(17:50 +0000)
committer
chl
<chl@openbsd.org>
Mon, 1 Sep 2008 17:50:15 +0000
(17:50 +0000)
initial patch from me, reworked by oga@.
found by LLVM/Clang Static Analyzer.
ok oga@
sys/dev/pci/drm/drm_memory.c
patch
|
blob
|
history
diff --git
a/sys/dev/pci/drm/drm_memory.c
b/sys/dev/pci/drm/drm_memory.c
index
81dc4a1
..
a1eba52
100644
(file)
--- a/
sys/dev/pci/drm/drm_memory.c
+++ b/
sys/dev/pci/drm/drm_memory.c
@@
-136,7
+136,10
@@
done:
void
drm_ioremapfree(drm_local_map_t *map)
{
- if (map != NULL && map->bsr != NULL)
+ if (map == NULL)
+ return;
+
+ if (map->bsr != NULL)
vga_pci_bar_unmap(map->bsr);
else
bus_space_unmap(map->bst, map->bsh, map->size);