mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Jassi Brar <jassisinghbrar@gmail.com>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ti-msgmgr: fix of_irq_get_byname() error check
Date: Sun, 30 Jul 2017 00:12:01 +0300	[thread overview]
Message-ID: <c918dd3c-8112-f330-831e-3bbc51ec525c@cogentembedded.com> (raw)
In-Reply-To: <20170729210444.190235497@cogentembedded.com>

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

      parent reply	other threads:[~2017-07-29 21:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-29 21:04 Sergei Shtylyov
2017-07-29 21:08 ` Sergei Shtylyov
2017-07-29 21:12 ` Sergei Shtylyov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c918dd3c-8112-f330-831e-3bbc51ec525c@cogentembedded.com \
    --to=sergei.shtylyov@cogentembedded.com \
    --cc=jassisinghbrar@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®