Re: [PATCH] fbdev: geocode: Add the missed pci_disable_device() in gx1fb_map_video_memory()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Add the missed function call to fix the bug.

…
> +++ b/drivers/video/fbdev/geode/gx1fb_core.c
> @@ -208,29 +208,44 @@  static int gx1fb_map_video_memory(struct fb_info *info, struct pci_dev *dev)
…
>  	return 0;
> +
> +err:
> +	pci_disable_device(dev);
> +	return ret;
>  }
…

I suggest to use more descriptive labels so that the exception handling
can be improved accordingly.

 	return 0;
+
+e_nomem:
+	ret = -ENOMEM;
+disable_device:
+	pci_disable_device(dev);
+	return ret;
 }


Regards,
Markus
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux