mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-28 03:40:04 +00:00
drm/amd/display: off by one in find_irq_source_info()
The ->info[] array has DAL_IRQ_SOURCES_NUMBER elements so this condition
should be >= instead of > or we could read one element beyond the end of
the array.
Fixes: 4562236b3b
("drm/amd/dc: Add dc display driver (v2)")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
20582319bc
commit
5d908944c5
1 changed files with 1 additions and 1 deletions
|
@ -78,7 +78,7 @@ const struct irq_source_info *find_irq_source_info(
|
|||
struct irq_service *irq_service,
|
||||
enum dc_irq_source source)
|
||||
{
|
||||
if (source > DAL_IRQ_SOURCES_NUMBER || source < DC_IRQ_SOURCE_INVALID)
|
||||
if (source >= DAL_IRQ_SOURCES_NUMBER || source < DC_IRQ_SOURCE_INVALID)
|
||||
return NULL;
|
||||
|
||||
return &irq_service->info[source];
|
||||
|
|
Loading…
Reference in a new issue