Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return EINVAL when allocating memory #280

Merged

Conversation

YusufKhan-gamedev
Copy link

Signed-off-by: Yusuf Khan

@aaronp24
Copy link
Member

aaronp24 commented Jun 3, 2022

0 and NULL have the same numerical value so these extra checks are redundant. These __pad values have uint types so comparing them against 0 is appropriate.

In addition, using | for logical or is unusual.

@YusufKhan-gamedev YusufKhan-gamedev force-pushed the nv_drm_gem_alloc_nvkms_memory_ioctlsret branch from 5e7f740 to 952f7a0 Compare June 3, 2022 19:07
@YusufKhan-gamedev YusufKhan-gamedev changed the title Return EINVAL when allocating memory and support NULL padding Return EINVAL when allocating memory Jun 3, 2022
@aritger aritger self-assigned this Jun 29, 2022
@aritger aritger merged commit 7c345b8 into NVIDIA:main Nov 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants