public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: tiffany.lin@mediatek.com (Tiffany Lin)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH -next] [media] mtk-vcodec: remove redundant return value check of platform_get_resource()
Date: Fri, 10 Feb 2017 11:35:13 +0800	[thread overview]
Message-ID: <1486697713.3862.6.camel@mtksdaap41> (raw)
In-Reply-To: <20170207151620.12711-1-weiyj.lk@gmail.com>

On Tue, 2017-02-07 at 15:16 +0000, Wei Yongjun wrote:
> From: Wei Yongjun <weiyongjun1@huawei.com>
> 
> Remove unneeded error handling on the result of a call
> to platform_get_resource() when the value is passed to
> devm_ioremap_resource().
> 
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Acked-by:Tiffany Lin <tiffany.lin@mediatek.com>

> ---
>  drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c | 5 -----
>  1 file changed, 5 deletions(-)
> 
> diff --git a/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c b/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c
> index aa81f3c..83f859e 100644
> --- a/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c
> +++ b/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c
> @@ -269,11 +269,6 @@ static int mtk_vcodec_probe(struct platform_device *pdev)
>  
>  	for (i = VENC_SYS, j = 0; i < NUM_MAX_VCODEC_REG_BASE; i++, j++) {
>  		res = platform_get_resource(pdev, IORESOURCE_MEM, j);
> -		if (res == NULL) {
> -			dev_err(&pdev->dev, "get memory resource failed.");
> -			ret = -ENXIO;
> -			goto err_res;
> -		}
>  		dev->reg_base[i] = devm_ioremap_resource(&pdev->dev, res);
>  		if (IS_ERR((__force void *)dev->reg_base[i])) {
>  			ret = PTR_ERR((__force void *)dev->reg_base[i]);
> 
> 
> 

      reply	other threads:[~2017-02-10  3:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-07 15:16 [PATCH -next] [media] mtk-vcodec: remove redundant return value check of platform_get_resource() Wei Yongjun
2017-02-10  3:35 ` Tiffany Lin [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=1486697713.3862.6.camel@mtksdaap41 \
    --to=tiffany.lin@mediatek.com \
    --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