ARM: OMAP: fix return value check in omap_device_build_from_dt()
Subsystems (3)
PATCH 1/1 ARM: OMAP: fix return value check in omap_device_build_from_dt()
From: Wei Yongjun <[email protected]>
In case of error, the function omap_device_alloc() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR().
--- arch/arm/mach-omap2/omap_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-omap2/omap_device.c +1 -1
@@ -155,7 +155,7 @@ static int omap_device_build_from_dt(struct platform_device *pdev) } od =omap_device_alloc (pdev, hwmods, oh_cnt); -if (!od) { +if (IS_ERR (od)) {dev_err (&pdev->dev,"Cannot allocate omap_device for :%s\n" , oh_name); ret =PTR_ERR (od);
Tony Lindgren
maintainerPATCH 1/1 ARM: OMAP: fix return value check in omap_device_build_from_dt()
Kevin,
Quoted 5 lines · Wei Yongjun
From: Wei Yongjun <[email protected]>
In case of error, the function
omap_device_alloc()returnsERR_PTR()and never returns NULL. The NULL test in the return value check should be replaced withIS_ERR().
Looks like this is still pending, care to take this?
Tony
Quoted 19 lines
Signed-off-by Wei Yongjun <[email protected]>--- arch/arm/mach-omap2/omap_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/arm/mach-omap2/omap_device.c +1
-1@@ -155,7 +155,7 @@ static int omap_device_build_from_dt(struct platform_device *pdev) } od =omap_device_alloc (pdev, hwmods, oh_cnt); -if (!od) { +if (IS_ERR (od)) {dev_err (&pdev->dev,"Cannot allocate omap_device for :%s\n" , oh_name); ret =PTR_ERR (od);
PATCH 1/1 ARM: OMAP: fix return value check in omap_device_build_from_dt()
Quoted 10 lines · Tony Lindgren
Kevin,
Quoted 5 lines · Wei Yongjun
From: Wei Yongjun <[email protected]>
In case of error, the function
omap_device_alloc()returnsERR_PTR()and never returns NULL. The NULL test in the return value check should be replaced withIS_ERR().Looks like this is still pending, care to take this?
Looks fine to me, since I don't have anything else in the queue, feel free to queue up for fixes-non-critical.
Kevin
Tony Lindgren
maintainerPATCH 1/1 ARM: OMAP: fix return value check in omap_device_build_from_dt()
Quoted 11 lines · Kevin Hilman
Quoted 9 lines · Tony Lindgren
Kevin,
Quoted 5 lines · Wei Yongjun
From: Wei Yongjun <[email protected]>
In case of error, the function
omap_device_alloc()returnsERR_PTR()and never returns NULL. The NULL test in the return value check should be replaced withIS_ERR().
Quoted 6 lines
Quoted 1 line
Looks like this is still pending, care to take this?
Acked-by Kevin Hilman <[email protected]>Looks fine to me, since I don't have anything else in the queue, feel free to queue up for fixes-non-critical.
Applying into omap-for-v3.12/fixes thanks.
Tony