Source-Changes-HG archive

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

[src/trunk]: src/sys/external/bsd/drm2/dist/drm/radeon Fix two issues in NetB...



details:   https://anonhg.NetBSD.org/src/rev/736301adba54
branches:  trunk
changeset: 338875:736301adba54
user:      jakllsch <jakllsch%NetBSD.org@localhost>
date:      Sat Jun 13 18:18:18 2015 +0000

description:
Fix two issues in NetBSD implementation of igp_read_bios_from_vram():

 * Allocate the correct buffer for the VGA BIOS image.
 * Abort if buffer allocation failed, not if buffer allocation succeeded.

Not directly tested, but I can't imagine this makes anything worse.

diffstat:

 sys/external/bsd/drm2/dist/drm/radeon/radeon_bios.c |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r 498e020a806f -r 736301adba54 sys/external/bsd/drm2/dist/drm/radeon/radeon_bios.c
--- a/sys/external/bsd/drm2/dist/drm/radeon/radeon_bios.c       Sat Jun 13 17:28:42 2015 +0000
+++ b/sys/external/bsd/drm2/dist/drm/radeon/radeon_bios.c       Sat Jun 13 18:18:18 2015 +0000
@@ -72,7 +72,7 @@
            (size < 256 * 1024) ||
            (bus_space_read_1(bst, bsh, 0) != 0x55) ||
            (bus_space_read_1(bst, bsh, 1) != 0xaa) ||
-           ((rdev = kmalloc(size, GFP_KERNEL)) != NULL)) {
+           ((rdev->bios = kmalloc(size, GFP_KERNEL)) == NULL)) {
                bus_space_unmap(bst, bsh, size);
                return false;
        }



Home | Main Index | Thread Index | Old Index