drm/komeda: Fix a signedness bug
Subsystems (5)
PATCH 1/1 drm/komeda: Fix a signedness bug
The mdev->irq value comes from platform_get_irq() so it can't be more than INT_MAX and if it's unsigned then it breaks the error handling in komeda_parse_dt().
--- drivers/gpu/drm/arm/display/komeda/komeda_dev.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/arm/display/komeda/komeda_dev.h +1 -1
@@ -82,7 +82,7 @@ struct komeda_dev {struct clk *mclk;/** @irq: irq number */ -u32 irq; +int irq;int n_pipelines;struct komeda_pipeline *pipelines[KOMEDA_MAX_PIPELINES ];
Signature · 1 line
2.17.1
Quoted 15 lines · Dan Carpenter
The
mdev->irqvalue comes fromplatform_get_irq()so it can't be more thanINT_MAXand if it's unsigned then it breaks the error handling inkomeda_parse_dt().Fixes 29e56aec911d ("drm/komeda: Add DT parsing")Signed-off-by Dan Carpenter <[email protected]>--- drivers/gpu/drm/arm/display/komeda/komeda_dev.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/arm/display/komeda/komeda_dev.h +0
-0
drivers/gpu/drm/arm/display/komeda/komeda_dev.h struct komeda_dev { · line 86
Quoted 6 lines
drivers/gpu/drm/arm/display/komeda/komeda_dev.h +1
-1@@ -82,7 +82,7 @@ struct komeda_dev {struct clk *mclk;/** @irq: irq number */ -u32 irq; +int irq;
Hi Dan:
Thank you.
Liviu and I discussed this problem, and we decided to fix it by
Remove IRQ parsing from initial series:
https://patchwork.freedesktop.org/patch/277409/
And add it back when add the fully IRQ handling:
https://patchwork.freedesktop.org/patch/279491/
drivers/gpu/drm/arm/display/komeda/komeda_dev.h struct komeda_dev { · line 88
Quoted 2 lines
drivers/gpu/drm/arm/display/komeda/komeda_dev.h +0
-0int n_pipelines;struct komeda_pipeline *pipelines[KOMEDA_MAX_PIPELINES ];
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.