Bug 14826

Summary: [patch] invalid check of return value of xf86SetOperatingState
Product: xorg Reporter: Doug Chapman <doug.chapman>
Component: Driver/RadeonAssignee: xf86-video-ati maintainers <xorg-driver-ati>
Status: RESOLVED FIXED QA Contact: Xorg Project Team <xorg-team>
Severity: critical    
Priority: high    
Version: git   
Hardware: Other   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
fix invalid return value check of xf86SetOperatingState none

Description Doug Chapman 2008-03-04 21:20:38 UTC
Created attachment 14851 [details] [review]
fix invalid return value check of xf86SetOperatingState

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.
Comment 1 Adam Jackson 2008-03-06 11:31:18 UTC
Fixed in master, thanks!

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.