Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1699374

Re: [PATCH] ti-msgmgr: fix of_irq_get_byname() error check

From Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Newsgroups linux.kernel
Subject Re: [PATCH] ti-msgmgr: fix of_irq_get_byname() error check
Date 2017-07-29 23:20 +0200
Message-ID <u8Hjs-7VV-9@gated-at.bofh.it> (permalink)
References <u8H9L-7Sg-5@gated-at.bofh.it>
Organization Cogent Embedded

Show all headers | View raw


On 07/30/2017 12:04 AM, Sergei Shtylyov wrote:

> of_irq_get_byname() may  return 0 as well as negative error number on
> failure,  while the driver only checks for the negative values. The driver
> would then call request_irq(0, ...) in ti_msgmgr_queue_startup() and never
> get a valid channel interrupt.
>
> Check for 'qinst->irq <= 0' instead and return -ENXIO from
> ti_msgmgr_queue_setup() and this fail the driver's probe iff

   s/this/thus/, sorry for the typo.

> of_irq_get_byname() returned 0.
>
> Fixes: aace66b170ce ("mailbox: Introduce TI message manager driver")
> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
[...]

MBR, Sergei

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH] ti-msgmgr: fix of_irq_get_byname() error check Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> - 2017-07-29 23:10 +0200
  Re: [PATCH] ti-msgmgr: fix of_irq_get_byname() error check Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> - 2017-07-29 23:20 +0200

csiph-web