All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Nihar Chaithanya <niharchaithanya@gmail.com>
Cc: dpenkler@gmail.com, roheetchavan@gmail.com, arnd@arndb.de,
	dan.carpenter@linaro.org, kees@ijzerbout.nl,
	m.omerfarukbulut@gmail.com, skhan@linuxfoundation.org,
	everestkc@everestkc.com.np,
	dominik.karol.piatkowski@protonmail.com, nathan@kernel.org,
	linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] staging: gpib: Add error handling
Date: Sun, 22 Dec 2024 07:08:53 +0100	[thread overview]
Message-ID: <2024122223-rebate-germless-c725@gregkh> (raw)
In-Reply-To: <20241221214822.163667-1-niharchaithanya@gmail.com>

On Sun, Dec 22, 2024 at 03:18:24AM +0530, Nihar Chaithanya wrote:
> The function gpib_register_driver() can fail when kmalloc()
> fails but it does not return an error code.
> The function pcmcia_register_driver() returns an error code but
> most of the times is not handled in gpib.
> 
> Modify gpid_register_driver() to return appropriate error code
> and also handle the error code returned by pcmcia_register_driver()
> incase it fails. When any of these functions fail unwind and
> unregister the driver to avoid semi-registered system.
> 
> This issue was reported by Coverity Scan.
> Report:
> CID 1635894: (#1 of 1): 'Constant' variable guards dead code (DEADCODE)
> dead_error_line: Execution cannot reach this statement: return -1;.
> 
> Signed-off-by: Nihar Chaithanya <niharchaithanya@gmail.com>
> ---
> v2 --> v3 : Modified the gpib_register_driver() to return error code,
>             added error handling to all the places that the
>             gpib_register_driver() is called.

You are doing a lot of different things all at once here.  Please break
this up into a patch series, only doing one "logical" thing per change
please.

thanks,

greg k-h

  reply	other threads:[~2024-12-22  6:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-21 21:48 [PATCH v3] staging: gpib: Add error handling Nihar Chaithanya
2024-12-22  6:08 ` Greg KH [this message]
2024-12-22  6:24 ` kernel test robot
2024-12-22  7:06 ` kernel test robot

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=2024122223-rebate-germless-c725@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=arnd@arndb.de \
    --cc=dan.carpenter@linaro.org \
    --cc=dominik.karol.piatkowski@protonmail.com \
    --cc=dpenkler@gmail.com \
    --cc=everestkc@everestkc.com.np \
    --cc=kees@ijzerbout.nl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=m.omerfarukbulut@gmail.com \
    --cc=nathan@kernel.org \
    --cc=niharchaithanya@gmail.com \
    --cc=roheetchavan@gmail.com \
    --cc=skhan@linuxfoundation.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.