]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] DRM modprobe retval fix
authorAndrew Morton <akpm@osdl.org>
Wed, 22 Oct 2003 01:22:45 +0000 (18:22 -0700)
committerLinus Torvalds <torvalds@home.osdl.org>
Wed, 22 Oct 2003 01:22:45 +0000 (18:22 -0700)
If you try to load a DRM module when agpgart is not present, modprobe says
"Cannot allocate memory", which is rather misleading.

Make it return -EINVAL instead.

drivers/char/drm/drm_drv.h

index 30f82e8809e021892cbb6ef17f7717b0e4c80998..35ecd064ceda36dc00ebc5b02ad5ed324c435968 100644 (file)
@@ -638,7 +638,7 @@ static int __init drm_init( void )
                        DRM_ERROR( "Cannot initialize the agpgart module.\n" );
                        DRM(stub_unregister)(DRM(minor)[i]);
                        DRM(takedown)( dev );
-                       return -ENOMEM;
+                       return -EINVAL;
                }
 #endif
 #if __REALLY_HAVE_MTRR