Bug 436064 - invalid check of return value of xf86SetOperatingState
invalid check of return value of xf86SetOperatingState
Status: CLOSED UPSTREAM
Product: Fedora
Classification: Fedora
Component: xorg-x11-drv-ati (Show other bugs)
rawhide
All Linux
high Severity high
: ---
: ---
Assigned To: Adam Jackson
Fedora Extras Quality Assurance
: Patch
Depends On:
Blocks: fedora-ia64
  Show dependency treegraph
 
Reported: 2008-03-05 00:30 EST by Doug Chapman
Modified: 2008-03-13 16:31 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-03-06 14:31:47 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
fix invalid return value check of xf86SetOperatingState (530 bytes, patch)
2008-03-05 00:30 EST, Doug Chapman
no flags Details | Diff
fix invalid return value check of xf86SetOperatingState (852 bytes, patch)
2008-03-05 00:35 EST, Doug Chapman
no flags Details | Diff

  None (edit)
Description Doug Chapman 2008-03-05 00:30:04 EST
Description of problem:
I found this on ia64 but I can't imagine it is ia64 specific....

I have filed this upstream at:
https://bugs.freedesktop.org/show_bug.cgi?id=14826

but it would be nice to get the fix into Fedora so we can finally have X working
on ia64 (most of which have Radeon cards).

----- Bug as filed at freedesktop.org ----

In xf86-video-ati/src/radeon_driver.c this check appears to always fail:

 if (xf86SetOperatingState(resVga, info->pEnt->index, ResUnusedOpr))


From looking at xf86SetOperatingState it appears that it returns a pointer on
success and NULL on failure.  Looking at all other drivers I see that no other
driver is looking at the return value at all.

It appears what was meant was:

if (!xf86SetOperatingState(resVga, info->pEnt->index, ResUnusedOpr))

Or. perhaps the intention was to not check the return value at all.  I was
unable to find any other driver that looks at it.

This seems to resolve the issues I was seeing with the Radeon card not
initializing on ia64 running Fedora.


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:
Comment 1 Doug Chapman 2008-03-05 00:30:04 EST
Created attachment 296848 [details]
fix invalid return value check of xf86SetOperatingState
Comment 2 Doug Chapman 2008-03-05 00:35:55 EST
Created attachment 296849 [details]
fix invalid return value check of xf86SetOperatingState

Ajax,

Same patch but in a git format that should be able to be pulled into a spec
file in case that makes it easier.

- Doug
Comment 3 Matěj Cepl 2008-03-05 16:30:11 EST
Great, thanks.
Comment 4 Adam Jackson 2008-03-06 14:31:47 EST
Fixed upstream, will pull new driver shortly.  Thanks!
Comment 5 Doug Chapman 2008-03-13 16:31:55 EDT
(In reply to comment #4)
> Fixed upstream, will pull new driver shortly.  Thanks!

Ajax,

can we pull the upstream driver down?  The latest version,
xorg-x11-drv-ati-6.8.0-4.fc9 does not have thsi patch.

thanks,

- Doug

Note You need to log in before you can comment on or make changes to this bug.