All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laura Abbott <labbott@redhat.com>
To: "Sudip Mukherjee" <sudipm.mukherjee@gmail.com>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Arve Hjønnevåg" <arve@android.com>,
	"Riley Andrews" <riandrews@android.com>
Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: android: ion: dummy: fix dereference of ERR_PTR
Date: Thu, 7 Apr 2016 15:05:17 -0700	[thread overview]
Message-ID: <5706D99D.6000009@redhat.com> (raw)
In-Reply-To: <1460046745-30345-1-git-send-email-sudipm.mukherjee@gmail.com>

On 04/07/2016 09:32 AM, Sudip Mukherjee wrote:
> ion_device_create() can fail and if it fails then it returns the error
> value in ERR_PTR.
>

Reviewed-by: Laura Abbott <labbott@redhat.com>

> Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk>
> ---
>   drivers/staging/android/ion/ion_dummy_driver.c | 2 ++
>   1 file changed, 2 insertions(+)
>
> diff --git a/drivers/staging/android/ion/ion_dummy_driver.c b/drivers/staging/android/ion/ion_dummy_driver.c
> index 5678870..806e76b 100644
> --- a/drivers/staging/android/ion/ion_dummy_driver.c
> +++ b/drivers/staging/android/ion/ion_dummy_driver.c
> @@ -68,6 +68,8 @@ static int __init ion_dummy_init(void)
>   	int i, err;
>
>   	idev = ion_device_create(NULL);
> +	if (IS_ERR(idev))
> +		return PTR_ERR(idev);
>   	heaps = kcalloc(dummy_ion_pdata.nr, sizeof(struct ion_heap *),
>   			GFP_KERNEL);
>   	if (!heaps)
>

      reply	other threads:[~2016-04-07 22:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-07 16:32 [PATCH] staging: android: ion: dummy: fix dereference of ERR_PTR Sudip Mukherjee
2016-04-07 22:05 ` Laura Abbott [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=5706D99D.6000009@redhat.com \
    --to=labbott@redhat.com \
    --cc=arve@android.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=riandrews@android.com \
    --cc=sudipm.mukherjee@gmail.com \
    /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.