public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Sylwester Nawrocki <s.nawrocki@samsung.com>
To: Sachin Kamat <sachin.kamat@linaro.org>
Cc: linux-media@vger.kernel.org, patches@linaro.org
Subject: Re: [PATCH 1/1] [media] exynos4-is: Fix potential null pointer dereference in mipi-csis.c
Date: Fri, 26 Apr 2013 10:52:19 +0200	[thread overview]
Message-ID: <517A4043.3040509@samsung.com> (raw)
In-Reply-To: <1366951447-6202-1-git-send-email-sachin.kamat@linaro.org>

On 04/26/2013 06:44 AM, Sachin Kamat wrote:
> When 'node' is NULL, the print statement tries to dereference it.
> Remove it from the error message.
> 
> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
> ---
>  drivers/media/platform/exynos4-is/mipi-csis.c |    3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/media/platform/exynos4-is/mipi-csis.c b/drivers/media/platform/exynos4-is/mipi-csis.c
> index a2eda9d..6ddc69f 100644
> --- a/drivers/media/platform/exynos4-is/mipi-csis.c
> +++ b/drivers/media/platform/exynos4-is/mipi-csis.c
> @@ -745,8 +745,7 @@ static int s5pcsis_parse_dt(struct platform_device *pdev,
>  
>  	node = v4l2_of_get_next_endpoint(node, NULL);
>  	if (!node) {
> -		dev_err(&pdev->dev, "No port node at %s\n",
> -					node->full_name);
> +		dev_err(&pdev->dev, "Port node not available\n");

Thanks Sachin. Could you instead do
s/node->full_name/pdev->dev.of_node->full_name ?

This way we won't loose any information and it would be easier to
determine which node exactly is wrong.


  reply	other threads:[~2013-04-26  8:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-26  4:44 [PATCH 1/1] [media] exynos4-is: Fix potential null pointer dereference in mipi-csis.c Sachin Kamat
2013-04-26  8:52 ` Sylwester Nawrocki [this message]
2013-04-26  8:57   ` Sachin Kamat

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=517A4043.3040509@samsung.com \
    --to=s.nawrocki@samsung.com \
    --cc=linux-media@vger.kernel.org \
    --cc=patches@linaro.org \
    --cc=sachin.kamat@linaro.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