Bug 14826 - [patch] invalid check of return value of xf86SetOperatingState
Summary: [patch] invalid check of return value of xf86SetOperatingState
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/Radeon (show other bugs)
Version: git
Hardware: Other Linux (All)
: high critical
Assignee: xf86-video-ati maintainers
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-04 21:20 UTC by Doug Chapman
Modified: 2008-03-06 11:31 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
fix invalid return value check of xf86SetOperatingState (530 bytes, patch)
2008-03-04 21:20 UTC, Doug Chapman
no flags Details | Splinter Review

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.