public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: nsekhar@ti•com (Sekhar Nori)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH v4 3/5] mmc: davinci_mmc: add DT support
Date: Tue, 5 Mar 2013 17:16:25 +0530	[thread overview]
Message-ID: <5135DB11.7080602@ti.com> (raw)
In-Reply-To: <A73F36158E33644199EB82C5EC81C7BC3EA484E9@DBDE01.ent.ti.com>

On 3/5/2013 4:54 PM, Manjunathappa, Prakash wrote:

>>> +	pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL);
>>> +	if (!pdata) {
>>> +		dev_err(&pdev->dev, "Failed to allocate memory for struct davinci_mmc_config\n");
>>> +		goto nodata;
>>
>> devm_kzalloc() returns NULL on error so you will end up returning
>> success in this case.
>>
> 
> Returns NULL on failure, caller is checking on NULL for failures.
> 
>         pdata = mmc_parse_pdata(pdev);
>         if (pdata == NULL) {
>                 dev_err(&pdev->dev, "Can not get platform data\n");
>                 return -ENOENT;
>         }

Ha, okay. I was somehow confused into thinking this is part of probe
routine.

Thanks,
Sekhar

  reply	other threads:[~2013-03-05 11:46 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-15  6:21 [PATCH v4 0/5] Add DT support for davinci_mmc driver Manjunathappa, Prakash
2013-02-15  6:21 ` [PATCH v4 1/5] ARM: davinci: mmc: derive version information from device name Manjunathappa, Prakash
2013-02-27 11:45   ` Sekhar Nori
2013-03-05 11:24     ` Manjunathappa, Prakash
2013-02-15  6:21 ` [PATCH v4 2/5] mmc: davinci_mmc: derive controller IP version from platform_device_id Manjunathappa, Prakash
2013-02-15  6:22 ` [PATCH v4 3/5] mmc: davinci_mmc: add DT support Manjunathappa, Prakash
2013-02-27 11:43   ` Sekhar Nori
2013-03-05 11:24     ` Manjunathappa, Prakash
2013-03-05 11:46       ` Sekhar Nori [this message]
2013-02-15  6:22 ` [PATCH v4 4/5] ARM: davinci: da850: add mmc DT entries Manjunathappa, Prakash
2013-02-15  6:22 ` [PATCH v4 5/5] ARM: davinci: da850: override mmc DT node device name Manjunathappa, Prakash
2013-02-27 14:04   ` Rob Herring
2013-02-28 10:51     ` Sekhar Nori

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=5135DB11.7080602@ti.com \
    --to=nsekhar@ti$(echo .)com \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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