From: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: linux-input@vger.kernel.org
Subject: Re: [PATCH] sensor-hub: Remove pointless NULL check
Date: Thu, 18 Oct 2012 11:58:14 -0700 [thread overview]
Message-ID: <50805146.6060904@linux.intel.com> (raw)
In-Reply-To: <20121009142010.16433.64833.stgit@bob.linux.org.uk>
Agreed. It was a mistake.
Thanks,
Srinivas
On 10/09/2012 07:20 AM, Alan Cox wrote:
> From: Alan Cox <alan@linux.intel.com>
>
> report cannot be NULL, fortunately as we use it before we check !
>
> Signed-off-by: Alan Cox <alan@linux.intel.com>
> ---
>
> drivers/hid/hid-sensor-hub.c | 4 ----
> 1 file changed, 4 deletions(-)
>
>
> diff --git a/drivers/hid/hid-sensor-hub.c b/drivers/hid/hid-sensor-hub.c
> index d9d73e9..4ff2497 100644
> --- a/drivers/hid/hid-sensor-hub.c
> +++ b/drivers/hid/hid-sensor-hub.c
> @@ -437,9 +437,6 @@ static int sensor_hub_raw_event(struct hid_device *hdev,
> ptr = raw_data;
> ptr++; /*Skip report id*/
>
> - if (!report)
> - goto err_report;
> -
> spin_lock_irqsave(&pdata->lock, flags);
>
> for (i = 0; i < report->maxfield; ++i) {
> @@ -485,7 +482,6 @@ static int sensor_hub_raw_event(struct hid_device *hdev,
> callback->pdev);
> spin_unlock_irqrestore(&pdata->lock, flags);
>
> -err_report:
> return 1;
> }
>
>
>
prev parent reply other threads:[~2012-10-18 18:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-09 14:20 [PATCH] sensor-hub: Remove pointless NULL check Alan Cox
2012-10-18 18:58 ` Srinivas Pandruvada [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=50805146.6060904@linux.intel.com \
--to=srinivas.pandruvada@linux.intel.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linux-input@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 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.