[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2024122223-rebate-germless-c725@gregkh>
Date: Sun, 22 Dec 2024 07:08:53 +0100
From: Greg KH <gregkh@...uxfoundation.org>
To: Nihar Chaithanya <niharchaithanya@...il.com>
Cc: dpenkler@...il.com, roheetchavan@...il.com, arnd@...db.de,
dan.carpenter@...aro.org, kees@...erbout.nl,
m.omerfarukbulut@...il.com, skhan@...uxfoundation.org,
everestkc@...restkc.com.np, dominik.karol.piatkowski@...tonmail.com,
nathan@...nel.org, linux-staging@...ts.linux.dev,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3] staging: gpib: Add error handling
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@...il.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
Powered by blists - more mailing lists