Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2] mmc: atmel-mci: use probe deferring if dma controller is not ready yet
Date: Wed, 19 Nov 2014 15:57:56 +0100	[thread overview]
Message-ID: <12322299.5p08TVzGz4@wuerfel> (raw)
In-Reply-To: <1416408667-4666-1-git-send-email-ludovic.desroches@atmel.com>

On Wednesday 19 November 2014 15:51:07 Ludovic Desroches wrote:
> @@ -2265,37 +2265,39 @@ static void atmci_cleanup_slot(struct atmel_mci_slot *slot,
>         mmc_free_host(slot->mmc);
>  }
>  
> -static bool atmci_configure_dma(struct atmel_mci *host)
> +static int atmci_configure_dma(struct atmel_mci *host)
>  {
>         struct mci_platform_data        *pdata;
>         dma_cap_mask_t mask;
> +       int ret = 0;
>  
>         if (host == NULL)
> -               return false;
> +               return -EINVAL;
>  
>         pdata = host->pdev->dev.platform_data;
>  
>         dma_cap_zero(mask);
>         dma_cap_set(DMA_SLAVE, mask);
>  
> 

Host can't be NULL here, the only caller has already checked and dereferenced
the pointer before calling atmci_configure_dma.

The mask variable is now completely unused and can be removed.

	Arnd

  reply	other threads:[~2014-11-19 14:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-19 14:51 [PATCH v2] mmc: atmel-mci: use probe deferring if dma controller is not ready yet Ludovic Desroches
2014-11-19 14:57 ` Arnd Bergmann [this message]
2014-11-19 15:15   ` Ludovic Desroches

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=12322299.5p08TVzGz4@wuerfel \
    --to=arnd@arndb.de \
    --cc=linux-arm-kernel@lists.infradead.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