mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Rolf Evers-Fischer <embedded24@evers-fischer.de>
To: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Cc: Rolf Evers-Fischer <embedded24@evers-fischer.de>,
	ysato@users.sourceforge.jp, dalias@libc.org,
	linux-sh@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] sh: dma: Add missing IS_ERR test
Date: Tue, 11 Jun 2019 12:00:25 +0200 (CEST)	[thread overview]
Message-ID: <alpine.LNX.2.21.99.1906111147340.3086@5HSWXM1> (raw)
In-Reply-To: <b731167e-6285-4fe0-e280-b2626b8efe44@cogentembedded.com>

Hello Sergei,

thanks for your feedback.

On Sat, 8 Jun 2019, Sergei Shtylyov wrote:

> Hello!
> 
> On 07.06.2019 14:54, Rolf Evers-Fischer wrote:
> 
> > get_dma_channel may return ERR_PTR, so a check is added.
> > 
> > Signed-off-by: Rolf Evers-Fischer <embedded24@evers-fischer.de>
> > ---
> >   arch/sh/drivers/dma/dma-api.c   | 20 +++++++++++++++++++-
> >   arch/sh/drivers/dma/dma-sysfs.c |  2 +-
> >   2 files changed, 20 insertions(+), 2 deletions(-)
> > 
> > diff --git a/arch/sh/drivers/dma/dma-api.c b/arch/sh/drivers/dma/dma-api.c
> > index ab9170494dcc..5d6f1a46cc5e 100644
> > --- a/arch/sh/drivers/dma/dma-api.c
> > +++ b/arch/sh/drivers/dma/dma-api.c
> > @@ -94,7 +94,7 @@ int get_dma_residue(unsigned int chan)
> >   	struct dma_info *info = get_dma_info(chan);
> >   	struct dma_channel *channel = get_dma_channel(chan);
> >   -	if (info->ops->get_residue)
> > +	if (!IS_ERR(channel) && (info->ops->get_residue))
> 
>    Extra parens not needed here.
> 
> [...]

I agree with you. They should better be removed.

Kind regards,
 Rolf

  reply	other threads:[~2019-06-11 10:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-07 11:54 Rolf Evers-Fischer
2019-06-08  8:27 ` Sergei Shtylyov
2019-06-11 10:00   ` Rolf Evers-Fischer [this message]
2019-06-08 12:26 ` Geert Uytterhoeven
2019-06-11 10:20   ` Rolf Evers-Fischer

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=alpine.LNX.2.21.99.1906111147340.3086@5HSWXM1 \
    --to=embedded24@evers-fischer.de \
    --cc=dalias@libc.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=sergei.shtylyov@cogentembedded.com \
    --cc=ysato@users.sourceforge.jp \
    /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

all inboxes | Powered by JetHome®