diff options
author | Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> | 2016-07-04 00:04:24 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-08-31 15:19:55 +0200 |
commit | e330b9a6bb35dc7097a4f02cb1ae7b6f96df92af (patch) | |
tree | 6a46cd1950f8523633b2c17ff9af9f4a8563ed99 /drivers/base/dma-mapping.c | |
parent | cpu: clean up register_cpu func (diff) | |
download | linux-e330b9a6bb35dc7097a4f02cb1ae7b6f96df92af.tar.xz linux-e330b9a6bb35dc7097a4f02cb1ae7b6f96df92af.zip |
platform: don't return 0 from platform_get_irq[_byname]() on error
of_irq_get[_byname]() return 0 iff irq_create_of_mapping() call fails.
Returning both error code and 0 on failure is a sign of a misdesigned API,
it makes the failure check unnecessarily complex and error prone. We should
rely on the platform IRQ resource in this case, not return 0, especially
as 0 can be a valid IRQ resource too...
Fixes: aff008ad813c ("platform_get_irq: Revert to platform_get_resource if of_irq_get fails")
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
CC: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/base/dma-mapping.c')
0 files changed, 0 insertions, 0 deletions