All of lore.kernel.org
 help / color / mirror / Atom feed
From: lpoulain <loic.poulain@intel.com>
To: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Cc: Marcel Holtmann <marcel@holtmann.org>, linux-bluetooth@vger.kernel.org
Subject: Re: hci_intel problem
Date: Thu, 28 Apr 2016 18:04:56 +0200	[thread overview]
Message-ID: <572234A8.4090308@intel.com> (raw)
In-Reply-To: <20160428135028.GB13659@kuha.fi.intel.com>

Hi Heikki,

> Hi Loic,
>
> Commit 765ea3abd116 ("Bluetooth: hci_intel: Retrieve host-wake IRQ")
> seems to create a little regression:
>
> [    2.734749] hci_intel INT33E1:00: No corresponding irq for gpio
> [    2.736426] BUG: unable to handle kernel NULL pointer dereference at           (null)
> [    2.738631] IP: [<ffffffff8132bee1>] desc_to_gpio+0x1/0x20
>
> I think it's usually ill-advised to convert the gpio descriptors to
> numbers unless there is a real need for it. Maybe you can just fix the
> dev_info() back to way it was.
>

Thanks for the catch, I'm going to fix this and only display the desc 
address per your advice.

Root cause is the null pointer deref of the reset desc in:
desc_to_gpio(idev->reset)

However I already test this value earlier in the function with:

idev->reset = devm_gpiod_get_optional(&pdev->dev, "reset", GPIOD_OUT_LOW);
if (IS_ERR(idev->reset)) {
         dev_err(&pdev->dev, "Unable to retrieve gpio\n");
         return PTR_ERR(idev->reset);
}

Problem is that devm_gpiod_get_optional can return either a ERR_PTR or 
NULL pointer.
I don't manage the NULL case, need to fix it as well.

Regards,
Loic

      reply	other threads:[~2016-04-28 16:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-28 13:50 hci_intel problem Heikki Krogerus
2016-04-28 16:04 ` lpoulain [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=572234A8.4090308@intel.com \
    --to=loic.poulain@intel.com \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=marcel@holtmann.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.