linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] spi: altera: Fix memory leak on error path
       [not found] <20210120082635.49304-1-bianpan2016@163.com>
@ 2021-01-20  8:35 ` Xu Yilun
  2021-01-20 15:03 ` Tom Rix
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 4+ messages in thread
From: Xu Yilun @ 2021-01-20  8:35 UTC (permalink / raw)
  To: Pan Bian
  Cc: Mark Brown, Matthew Gerlach, Tom Rix, Wu Hao, linux-spi, linux-kernel

On Wed, Jan 20, 2021 at 12:26:35AM -0800, Pan Bian wrote:
> Release master that have been previously allocated if the number of
> chipselect is invalid.
> 
> Fixes: 8e04187c1bc7 ("spi: altera: add SPI core parameters support via platform data.")
> Signed-off-by: Pan Bian <bianpan2016@163.com>
> ---
>  drivers/spi/spi-altera.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/spi/spi-altera.c b/drivers/spi/spi-altera.c
> index cbc4c28c1541..62ea0c9e321b 100644
> --- a/drivers/spi/spi-altera.c
> +++ b/drivers/spi/spi-altera.c
> @@ -254,7 +254,8 @@ static int altera_spi_probe(struct platform_device *pdev)
>  			dev_err(&pdev->dev,
>  				"Invalid number of chipselect: %hu\n",
>  				pdata->num_chipselect);
> -			return -EINVAL;
> +			err = -EINVAL;
> +			goto exit;

Thanks for the fix. Looks good to me.

Yilun

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] spi: altera: Fix memory leak on error path
       [not found] <20210120082635.49304-1-bianpan2016@163.com>
  2021-01-20  8:35 ` [PATCH] spi: altera: Fix memory leak on error path Xu Yilun
@ 2021-01-20 15:03 ` Tom Rix
  2021-01-21  0:08 ` Mark Brown
  2021-01-21 18:07 ` matthew.gerlach
  3 siblings, 0 replies; 4+ messages in thread
From: Tom Rix @ 2021-01-20 15:03 UTC (permalink / raw)
  To: Pan Bian, Mark Brown, Xu Yilun, Matthew Gerlach, Wu Hao
  Cc: linux-spi, linux-kernel


On 1/20/21 12:26 AM, Pan Bian wrote:
> Release master that have been previously allocated if the number of
> chipselect is invalid.
>
> Fixes: 8e04187c1bc7 ("spi: altera: add SPI core parameters support via platform data.")
> Signed-off-by: Pan Bian <bianpan2016@163.com>
> ---
>  drivers/spi/spi-altera.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/spi/spi-altera.c b/drivers/spi/spi-altera.c
> index cbc4c28c1541..62ea0c9e321b 100644
> --- a/drivers/spi/spi-altera.c
> +++ b/drivers/spi/spi-altera.c
> @@ -254,7 +254,8 @@ static int altera_spi_probe(struct platform_device *pdev)
>  			dev_err(&pdev->dev,
>  				"Invalid number of chipselect: %hu\n",
>  				pdata->num_chipselect);
> -			return -EINVAL;
> +			err = -EINVAL;
> +			goto exit;
>  		}
>  
>  		master->num_chipselect = pdata->num_chipselect;
Reviewed-by: Tom Rix <trix@redhat.com>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] spi: altera: Fix memory leak on error path
       [not found] <20210120082635.49304-1-bianpan2016@163.com>
  2021-01-20  8:35 ` [PATCH] spi: altera: Fix memory leak on error path Xu Yilun
  2021-01-20 15:03 ` Tom Rix
@ 2021-01-21  0:08 ` Mark Brown
  2021-01-21 18:07 ` matthew.gerlach
  3 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2021-01-21  0:08 UTC (permalink / raw)
  To: Pan Bian, Tom Rix, Xu Yilun, Wu Hao, Matthew Gerlach
  Cc: linux-kernel, linux-spi

On Wed, 20 Jan 2021 00:26:35 -0800, Pan Bian wrote:
> Release master that have been previously allocated if the number of
> chipselect is invalid.

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next

Thanks!

[1/1] spi: altera: Fix memory leak on error path
      commit: 55a8b42e8645a6dab88674a30cb6ed328e660680

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] spi: altera: Fix memory leak on error path
       [not found] <20210120082635.49304-1-bianpan2016@163.com>
                   ` (2 preceding siblings ...)
  2021-01-21  0:08 ` Mark Brown
@ 2021-01-21 18:07 ` matthew.gerlach
  3 siblings, 0 replies; 4+ messages in thread
From: matthew.gerlach @ 2021-01-21 18:07 UTC (permalink / raw)
  To: Pan Bian; +Cc: Mark Brown, Xu Yilun, Tom Rix, Wu Hao, linux-spi, linux-kernel



On Wed, 20 Jan 2021, Pan Bian wrote:

> Release master that have been previously allocated if the number of
> chipselect is invalid.
>
> Fixes: 8e04187c1bc7 ("spi: altera: add SPI core parameters support via platform data.")
> Signed-off-by: Pan Bian <bianpan2016@163.com>
Acked-by: Matthew Gerlach <matthew.gerlach@linux.intel.com>
> ---
> drivers/spi/spi-altera.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/spi/spi-altera.c b/drivers/spi/spi-altera.c
> index cbc4c28c1541..62ea0c9e321b 100644
> --- a/drivers/spi/spi-altera.c
> +++ b/drivers/spi/spi-altera.c
> @@ -254,7 +254,8 @@ static int altera_spi_probe(struct platform_device *pdev)
> 			dev_err(&pdev->dev,
> 				"Invalid number of chipselect: %hu\n",
> 				pdata->num_chipselect);
> -			return -EINVAL;
> +			err = -EINVAL;
> +			goto exit;
> 		}
>
> 		master->num_chipselect = pdata->num_chipselect;
> -- 
> 2.17.1
>
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-01-21 18:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20210120082635.49304-1-bianpan2016@163.com>
2021-01-20  8:35 ` [PATCH] spi: altera: Fix memory leak on error path Xu Yilun
2021-01-20 15:03 ` Tom Rix
2021-01-21  0:08 ` Mark Brown
2021-01-21 18:07 ` matthew.gerlach

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).