Hi
On Sat, Apr 5, 2014 at 11:44 AM, Daniel Vetter daniel.vetter@ffwll.ch wrote:
The context_dtor callback is only called once we've successfully loaded the driver, which means dev->dev_private is set up. The check is hence pointless.
Also dev->dev_private is deref already above, so compilers are free to elide it anyway.
Are you sure compilers can assume "*ptr" implies "ptr != NULL"? I doubt that and depending on CONFIG_DEFAULT_MMAP_MIN_ADDR I think you can even build user-space that can successfully mmap(MAP_FIXED) at address 0. Anyhow, I guess no-one cares besides me, so patch looks good :)
Thanks David