Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm: ->agp_init can't fail

Thanks to the removal of REQUIRE_AGP we can use a void return value
and shed a bit of complexity.

Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Dave Airlie <airlied@redhat.com>

authored by

Daniel Vetter and committed by
Dave Airlie
8da79ccd 24986ee0

+4 -8
+1 -2
drivers/gpu/drm/drm_pci.c
··· 262 262 return 0; 263 263 } 264 264 265 - static int drm_pci_agp_init(struct drm_device *dev) 265 + static void drm_pci_agp_init(struct drm_device *dev) 266 266 { 267 267 if (drm_core_has_AGP(dev)) { 268 268 if (drm_pci_device_is_agp(dev)) ··· 274 274 1024 * 1024); 275 275 } 276 276 } 277 - return 0; 278 277 } 279 278 280 279 static void drm_pci_agp_destroy(struct drm_device *dev)
+2 -5
drivers/gpu/drm/drm_stub.c
··· 527 527 528 528 mutex_lock(&drm_global_mutex); 529 529 530 - if (dev->driver->bus->agp_init) { 531 - ret = dev->driver->bus->agp_init(dev); 532 - if (ret) 533 - goto out_unlock; 534 - } 530 + if (dev->driver->bus->agp_init) 531 + dev->driver->bus->agp_init(dev); 535 532 536 533 if (drm_core_check_feature(dev, DRIVER_MODESET)) { 537 534 ret = drm_get_minor(dev, &dev->control, DRM_MINOR_CONTROL);
+1 -1
include/drm/drmP.h
··· 767 767 struct drm_unique *unique); 768 768 int (*irq_by_busid)(struct drm_device *dev, struct drm_irq_busid *p); 769 769 /* hooks that are for PCI */ 770 - int (*agp_init)(struct drm_device *dev); 770 + void (*agp_init)(struct drm_device *dev); 771 771 void (*agp_destroy)(struct drm_device *dev); 772 772 773 773 };