uio: uio_dmem_genirq: check the return value of devm_kasprintf()
PATCH 1/1 uio: uio_dmem_genirq: check the return value of devm_kasprintf()
From: Bartosz Golaszewski <[email protected]>
devm_kasprintf() can fail so check its return value and bail-out on no memory.
--- drivers/uio/uio_dmem_genirq.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/uio/uio_dmem_genirq.c +2 -0
@@ -167,6 +167,8 @@ static int uio_dmem_genirq_probe(struct platform_device *pdev) } uioinfo->name =devm_kasprintf (&pdev->dev,GFP_KERNEL ,"%pOFn" , pdev->dev.of_node); +if (!uioinfo->name) +return -ENOMEM ; uioinfo->version ="devicetree" ; }
Signature · 1 line
2.45.2
Quoted 26 lines · Bartosz Golaszewski
From: Bartosz Golaszewski <[email protected]>
devm_kasprintf()can fail so check its return value and bail-out on no memory.Fixes 52e2dc2ce2d8 ("uio: Convert a few more users to using %pOFn instead of device_node.name")Signed-off-by Bartosz Golaszewski <[email protected]>--- drivers/uio/uio_dmem_genirq.c | 2 ++ 1 file changed, 2 insertions(+)drivers/uio/uio_dmem_genirq.c +2
-1@@ -167,6 +167,8 @@ static int uio_dmem_genirq_probe(struct platform_device *pdev) } uioinfo->name =devm_kasprintf (&pdev->dev,GFP_KERNEL ,"%pOFn" , pdev->dev.of_node); +if (!uioinfo->name) +return -ENOMEM ; uioinfo->version ="devicetree" ; } --
Quoted 2 lines
2.45.2
Gentle ping?
Bartosz
Greg Kroah-Hartman
maintainerQuoted 26 lines · Bartosz Golaszewski
Quoted 25 lines · Bartosz Golaszewski
From: Bartosz Golaszewski <[email protected]>
devm_kasprintf()can fail so check its return value and bail-out on no memory.Fixes 52e2dc2ce2d8 ("uio: Convert a few more users to using %pOFn instead of device_node.name")Signed-off-by Bartosz Golaszewski <[email protected]>--- drivers/uio/uio_dmem_genirq.c | 2 ++ 1 file changed, 2 insertions(+)drivers/uio/uio_dmem_genirq.c +2
-0@@ -167,6 +167,8 @@ static int uio_dmem_genirq_probe(struct platform_device *pdev) } uioinfo->name =devm_kasprintf (&pdev->dev,GFP_KERNEL ,"%pOFn" , pdev->dev.of_node); +if (!uioinfo->name) +return -ENOMEM ; uioinfo->version ="devicetree" ; }
Quoted 5 lines
Quoted 3 lines
--
2.45.2Gentle ping?
It's in my queue. The "fix up an error path" patches are on the bottom of all my reviews as generally they are a pain to review as it takes a lot of out-of-band code reading. And they have a bad history of being wrong. And they are really low on the priority as they really can't be triggered :)
So I'll get to them, but realize that they are a pain to deal with...
thanks,
greg k-h