Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys drm_dev_alloc now returns ERR_PTR, check for that.
details: https://anonhg.NetBSD.org/src/rev/545205bf0a0f
branches: trunk
changeset: 1028424:545205bf0a0f
user: riastradh <riastradh%NetBSD.org@localhost>
date: Sun Dec 19 11:01:21 2021 +0000
description:
drm_dev_alloc now returns ERR_PTR, check for that.
Author: Maya Rashish <maya%NetBSD.org@localhost>
Committer: Taylor R Campbell <riastradh%NetBSD.org@localhost>
diffstat:
sys/arch/arm/nvidia/tegra_drm.c | 6 +++---
sys/arch/arm/nvidia/tegra_nouveau.c | 6 +++---
sys/arch/arm/rockchip/rk_drm.c | 6 +++---
sys/arch/arm/sunxi/sunxi_drm.c | 6 +++---
sys/arch/arm/ti/ti_lcdc.c | 6 +++---
sys/external/bsd/drm2/pci/drm_pci.c | 7 ++++---
6 files changed, 19 insertions(+), 18 deletions(-)
diffs (170 lines):
diff -r 1a2ea3d5b285 -r 545205bf0a0f sys/arch/arm/nvidia/tegra_drm.c
--- a/sys/arch/arm/nvidia/tegra_drm.c Sun Dec 19 11:01:10 2021 +0000
+++ b/sys/arch/arm/nvidia/tegra_drm.c Sun Dec 19 11:01:21 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tegra_drm.c,v 1.11 2021/01/27 03:10:19 thorpej Exp $ */
+/* $NetBSD: tegra_drm.c,v 1.12 2021/12/19 11:01:21 riastradh Exp $ */
/*-
* Copyright (c) 2015 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tegra_drm.c,v 1.11 2021/01/27 03:10:19 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tegra_drm.c,v 1.12 2021/12/19 11:01:21 riastradh Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -199,7 +199,7 @@
prop_dictionary_get_bool(prop, "force-dvi", &sc->sc_force_dvi);
sc->sc_ddev = drm_dev_alloc(driver, sc->sc_dev);
- if (sc->sc_ddev == NULL) {
+ if (IS_ERR(sc->sc_ddev)) {
aprint_error_dev(self, "couldn't allocate DRM device\n");
return;
}
diff -r 1a2ea3d5b285 -r 545205bf0a0f sys/arch/arm/nvidia/tegra_nouveau.c
--- a/sys/arch/arm/nvidia/tegra_nouveau.c Sun Dec 19 11:01:10 2021 +0000
+++ b/sys/arch/arm/nvidia/tegra_nouveau.c Sun Dec 19 11:01:21 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tegra_nouveau.c,v 1.16 2021/01/27 03:10:19 thorpej Exp $ */
+/* $NetBSD: tegra_nouveau.c,v 1.17 2021/12/19 11:01:21 riastradh Exp $ */
/*-
* Copyright (c) 2015 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tegra_nouveau.c,v 1.16 2021/01/27 03:10:19 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tegra_nouveau.c,v 1.17 2021/12/19 11:01:21 riastradh Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -221,7 +221,7 @@
}
dev = drm_dev_alloc(driver, sc->sc_dev);
- if (dev == NULL) {
+ if (IS_ERR(dev)) {
aprint_error_dev(self, "couldn't allocate DRM device\n");
return;
}
diff -r 1a2ea3d5b285 -r 545205bf0a0f sys/arch/arm/rockchip/rk_drm.c
--- a/sys/arch/arm/rockchip/rk_drm.c Sun Dec 19 11:01:10 2021 +0000
+++ b/sys/arch/arm/rockchip/rk_drm.c Sun Dec 19 11:01:21 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rk_drm.c,v 1.9 2021/12/19 11:01:10 riastradh Exp $ */
+/* $NetBSD: rk_drm.c,v 1.10 2021/12/19 11:01:21 riastradh Exp $ */
/*-
* Copyright (c) 2019 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rk_drm.c,v 1.9 2021/12/19 11:01:10 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rk_drm.c,v 1.10 2021/12/19 11:01:21 riastradh Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -146,7 +146,7 @@
aprint_normal("\n");
sc->sc_ddev = drm_dev_alloc(driver, sc->sc_dev);
- if (sc->sc_ddev == NULL) {
+ if (IS_ERR(sc->sc_ddev)) {
aprint_error_dev(self, "couldn't allocate DRM device\n");
return;
}
diff -r 1a2ea3d5b285 -r 545205bf0a0f sys/arch/arm/sunxi/sunxi_drm.c
--- a/sys/arch/arm/sunxi/sunxi_drm.c Sun Dec 19 11:01:10 2021 +0000
+++ b/sys/arch/arm/sunxi/sunxi_drm.c Sun Dec 19 11:01:21 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sunxi_drm.c,v 1.17 2021/12/19 11:01:10 riastradh Exp $ */
+/* $NetBSD: sunxi_drm.c,v 1.18 2021/12/19 11:01:21 riastradh Exp $ */
/*-
* Copyright (c) 2019 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sunxi_drm.c,v 1.17 2021/12/19 11:01:10 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sunxi_drm.c,v 1.18 2021/12/19 11:01:21 riastradh Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -155,7 +155,7 @@
aprint_normal(": Display Engine Pipeline\n");
sc->sc_ddev = drm_dev_alloc(driver, sc->sc_dev);
- if (sc->sc_ddev == NULL) {
+ if (IS_ERR(sc->sc_ddev)) {
aprint_error_dev(self, "couldn't allocate DRM device\n");
return;
}
diff -r 1a2ea3d5b285 -r 545205bf0a0f sys/arch/arm/ti/ti_lcdc.c
--- a/sys/arch/arm/ti/ti_lcdc.c Sun Dec 19 11:01:10 2021 +0000
+++ b/sys/arch/arm/ti/ti_lcdc.c Sun Dec 19 11:01:21 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ti_lcdc.c,v 1.7 2021/08/07 16:18:46 thorpej Exp $ */
+/* $NetBSD: ti_lcdc.c,v 1.8 2021/12/19 11:01:21 riastradh Exp $ */
/*-
* Copyright (c) 2019 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ti_lcdc.c,v 1.7 2021/08/07 16:18:46 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ti_lcdc.c,v 1.8 2021/12/19 11:01:21 riastradh Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -420,7 +420,7 @@
fdt_ports_register(&sc->sc_ports, self, phandle, EP_DRM_ENCODER);
sc->sc_ddev = drm_dev_alloc(driver, sc->sc_dev);
- if (sc->sc_ddev == NULL) {
+ if (IS_ERR(sc->sc_ddev)) {
aprint_error_dev(self, "couldn't allocate DRM device\n");
return;
}
diff -r 1a2ea3d5b285 -r 545205bf0a0f sys/external/bsd/drm2/pci/drm_pci.c
--- a/sys/external/bsd/drm2/pci/drm_pci.c Sun Dec 19 11:01:10 2021 +0000
+++ b/sys/external/bsd/drm2/pci/drm_pci.c Sun Dec 19 11:01:21 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: drm_pci.c,v 1.42 2021/12/19 10:37:09 riastradh Exp $ */
+/* $NetBSD: drm_pci.c,v 1.43 2021/12/19 11:01:22 riastradh Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: drm_pci.c,v 1.42 2021/12/19 10:37:09 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: drm_pci.c,v 1.43 2021/12/19 11:01:22 riastradh Exp $");
#include <sys/types.h>
#include <sys/errno.h>
@@ -38,6 +38,7 @@
#include <dev/pci/pcivar.h>
+#include <linux/err.h>
#include <drm/drm_agpsupport.h>
#include <drm/drm_device.h>
#include <drm/drm_drv.h>
@@ -74,7 +75,7 @@
/* Create a DRM device. */
dev = drm_dev_alloc(driver, self);
- if (dev == NULL) {
+ if (IS_ERR(dev)) {
ret = -ENOMEM;
goto fail0;
}
Home |
Main Index |
Thread Index |
Old Index