Re: [PATCH] mmc: tmio, renesas_sdhi: Remove unneeded NULL check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 9 January 2018 at 10:39, Dan Carpenter <dan.carpenter@xxxxxxxxxx> wrote:
> The inconsistent NULL checking in this function causes static checker
> warnings.
>
>     drivers/mmc/host/renesas_sdhi_sys_dmac.c:360 renesas_sdhi_sys_dmac_issue_tasklet_fn()
>     error: we previously assumed 'host' could be null (see line 351)
>
> On reviewing this code, "host" can't ever be NULL so we can just remove
> the check.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>

Thanks, applied for next!

Kind regards
Uffe

>
> diff --git a/drivers/mmc/host/renesas_sdhi_sys_dmac.c b/drivers/mmc/host/renesas_sdhi_sys_dmac.c
> index c8a74b2dee00..82d757c480b2 100644
> --- a/drivers/mmc/host/renesas_sdhi_sys_dmac.c
> +++ b/drivers/mmc/host/renesas_sdhi_sys_dmac.c
> @@ -348,7 +348,7 @@ static void renesas_sdhi_sys_dmac_issue_tasklet_fn(unsigned long priv)
>
>         spin_lock_irq(&host->lock);
>
> -       if (host && host->data) {
> +       if (host->data) {
>                 if (host->data->flags & MMC_DATA_READ)
>                         chan = host->chan_rx;
>                 else
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux