* drivers/gpu/drm/radeon/r100.c: check for invalid family
@ 2009-12-24 13:21 Darren Jenkins
0 siblings, 0 replies; only message in thread
From: Darren Jenkins @ 2009-12-24 13:21 UTC (permalink / raw)
To: David Airlie, dri-devel mailing list, Kernel Janitors
Cc: Linux Kernel Mailing List
If there is an invalid family the fw_name is NULL and causes an
NULL pointer dereference.
This just adds a check for something unexpected.
Coverity CID: 13251
Signed-off-by: Darren Jenkins <darrenrjenkins@gmail.com>
diff --git a/drivers/gpu/drm/radeon/r100.c
b/drivers/gpu/drm/radeon/r100.c
index 84e5df7..7d5de31 100644
--- a/drivers/gpu/drm/radeon/r100.c
+++ b/drivers/gpu/drm/radeon/r100.c
@@ -584,6 +584,8 @@ static int r100_cp_init_microcode(struct
radeon_device *rdev)
(rdev->family == CHIP_RV570)) {
DRM_INFO("Loading R500 Microcode\n");
fw_name = FIRMWARE_R520;
+ } else {
+ return -EINVAL;
}
err = request_firmware(&rdev->me_fw, fw_name, &pdev->dev);
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2009-12-24 13:21 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-24 13:21 drivers/gpu/drm/radeon/r100.c: check for invalid family Darren Jenkins
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox