All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] iommu/fsl_pamu: Remove unnecessary null test before kfree
@ 2014-06-29  8:01 ` Fabian Frederick
  0 siblings, 0 replies; 6+ messages in thread
From: Fabian Frederick @ 2014-06-29  8:01 UTC (permalink / raw)
  To: linux-kernel
  Cc: Fabian Frederick, Joerg Roedel, Grant Likely, iommu, devicetree

Fix checkpatch warning:
WARNING: kfree(NULL) is safe this check is probably not required

Cc: Joerg Roedel <joro@8bytes.org>
Cc: Grant Likely <grant.likely@linaro.org>
Cc: iommu@lists.linux-foundation.org
Cc: devicetree@vger.kernel.org
Signed-off-by: Fabian Frederick <fabf@skynet.be>
---
 drivers/iommu/fsl_pamu_domain.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/iommu/fsl_pamu_domain.c b/drivers/iommu/fsl_pamu_domain.c
index 93072ba..0009dff 100644
--- a/drivers/iommu/fsl_pamu_domain.c
+++ b/drivers/iommu/fsl_pamu_domain.c
@@ -1118,8 +1118,7 @@ static int fsl_pamu_set_windows(struct iommu_domain *domain, u32 w_count)
 	ret = pamu_set_domain_geometry(dma_domain, &domain->geometry,
 				((w_count > 1) ? w_count : 0));
 	if (!ret) {
-		if (dma_domain->win_arr)
-			kfree(dma_domain->win_arr);
+		kfree(dma_domain->win_arr);
 		dma_domain->win_arr = kzalloc(sizeof(struct dma_window) *
 							  w_count, GFP_ATOMIC);
 		if (!dma_domain->win_arr) {
-- 
1.8.4.5


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

* [PATCH 1/1] iommu/fsl_pamu: Remove unnecessary null test before kfree
@ 2014-06-29  8:01 ` Fabian Frederick
  0 siblings, 0 replies; 6+ messages in thread
From: Fabian Frederick @ 2014-06-29  8:01 UTC (permalink / raw)
  To: linux-kernel-u79uwXL29TY76Z2rM5mHXA
  Cc: Fabian Frederick, Grant Likely,
	iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
	devicetree-u79uwXL29TY76Z2rM5mHXA

Fix checkpatch warning:
WARNING: kfree(NULL) is safe this check is probably not required

Cc: Joerg Roedel <joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>
Cc: Grant Likely <grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org
Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Signed-off-by: Fabian Frederick <fabf-AgBVmzD5pcezQB+pC5nmwQ@public.gmane.org>
---
 drivers/iommu/fsl_pamu_domain.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/iommu/fsl_pamu_domain.c b/drivers/iommu/fsl_pamu_domain.c
index 93072ba..0009dff 100644
--- a/drivers/iommu/fsl_pamu_domain.c
+++ b/drivers/iommu/fsl_pamu_domain.c
@@ -1118,8 +1118,7 @@ static int fsl_pamu_set_windows(struct iommu_domain *domain, u32 w_count)
 	ret = pamu_set_domain_geometry(dma_domain, &domain->geometry,
 				((w_count > 1) ? w_count : 0));
 	if (!ret) {
-		if (dma_domain->win_arr)
-			kfree(dma_domain->win_arr);
+		kfree(dma_domain->win_arr);
 		dma_domain->win_arr = kzalloc(sizeof(struct dma_window) *
 							  w_count, GFP_ATOMIC);
 		if (!dma_domain->win_arr) {
-- 
1.8.4.5

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

* RE: [PATCH 1/1] iommu/fsl_pamu: Remove unnecessary null test before kfree
@ 2014-06-29 11:17   ` Varun Sethi
  0 siblings, 0 replies; 6+ messages in thread
From: Varun Sethi @ 2014-06-29 11:17 UTC (permalink / raw)
  To: Fabian Frederick, linux-kernel; +Cc: Grant Likely, iommu, devicetree



> -----Original Message-----
> From: iommu-bounces@lists.linux-foundation.org [mailto:iommu-
> bounces@lists.linux-foundation.org] On Behalf Of Fabian Frederick
> Sent: Sunday, June 29, 2014 1:31 PM
> To: linux-kernel@vger.kernel.org
> Cc: Fabian Frederick; Grant Likely; iommu@lists.linux-foundation.org;
> devicetree@vger.kernel.org
> Subject: [PATCH 1/1] iommu/fsl_pamu: Remove unnecessary null test before
> kfree
> 
> Fix checkpatch warning:
> WARNING: kfree(NULL) is safe this check is probably not required
> 
> Cc: Joerg Roedel <joro@8bytes.org>
> Cc: Grant Likely <grant.likely@linaro.org>
> Cc: iommu@lists.linux-foundation.org
> Cc: devicetree@vger.kernel.org
> Signed-off-by: Fabian Frederick <fabf@skynet.be>
> ---
>  drivers/iommu/fsl_pamu_domain.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/iommu/fsl_pamu_domain.c
> b/drivers/iommu/fsl_pamu_domain.c index 93072ba..0009dff 100644
> --- a/drivers/iommu/fsl_pamu_domain.c
> +++ b/drivers/iommu/fsl_pamu_domain.c
> @@ -1118,8 +1118,7 @@ static int fsl_pamu_set_windows(struct iommu_domain
> *domain, u32 w_count)
>  	ret = pamu_set_domain_geometry(dma_domain, &domain->geometry,
>  				((w_count > 1) ? w_count : 0));
>  	if (!ret) {
> -		if (dma_domain->win_arr)
> -			kfree(dma_domain->win_arr);
> +		kfree(dma_domain->win_arr);
>  		dma_domain->win_arr = kzalloc(sizeof(struct dma_window) *
>  							  w_count, GFP_ATOMIC);
>  		if (!dma_domain->win_arr) {

Acked-by: Varun Sethi <varun.sethi@freescale.com>

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

* RE: [PATCH 1/1] iommu/fsl_pamu: Remove unnecessary null test before kfree
@ 2014-06-29 11:17   ` Varun Sethi
  0 siblings, 0 replies; 6+ messages in thread
From: Varun Sethi @ 2014-06-29 11:17 UTC (permalink / raw)
  To: Fabian Frederick, linux-kernel-u79uwXL29TY76Z2rM5mHXA
  Cc: Grant Likely, devicetree-u79uwXL29TY76Z2rM5mHXA,
	iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA



> -----Original Message-----
> From: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org [mailto:iommu-
> bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org] On Behalf Of Fabian Frederick
> Sent: Sunday, June 29, 2014 1:31 PM
> To: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> Cc: Fabian Frederick; Grant Likely; iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org;
> devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> Subject: [PATCH 1/1] iommu/fsl_pamu: Remove unnecessary null test before
> kfree
> 
> Fix checkpatch warning:
> WARNING: kfree(NULL) is safe this check is probably not required
> 
> Cc: Joerg Roedel <joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>
> Cc: Grant Likely <grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
> Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org
> Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> Signed-off-by: Fabian Frederick <fabf-AgBVmzD5pcezQB+pC5nmwQ@public.gmane.org>
> ---
>  drivers/iommu/fsl_pamu_domain.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/iommu/fsl_pamu_domain.c
> b/drivers/iommu/fsl_pamu_domain.c index 93072ba..0009dff 100644
> --- a/drivers/iommu/fsl_pamu_domain.c
> +++ b/drivers/iommu/fsl_pamu_domain.c
> @@ -1118,8 +1118,7 @@ static int fsl_pamu_set_windows(struct iommu_domain
> *domain, u32 w_count)
>  	ret = pamu_set_domain_geometry(dma_domain, &domain->geometry,
>  				((w_count > 1) ? w_count : 0));
>  	if (!ret) {
> -		if (dma_domain->win_arr)
> -			kfree(dma_domain->win_arr);
> +		kfree(dma_domain->win_arr);
>  		dma_domain->win_arr = kzalloc(sizeof(struct dma_window) *
>  							  w_count, GFP_ATOMIC);
>  		if (!dma_domain->win_arr) {

Acked-by: Varun Sethi <varun.sethi-KZfg59tc24xl57MIdRCFDg@public.gmane.org>

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

* Re: [PATCH 1/1] iommu/fsl_pamu: Remove unnecessary null test before kfree
@ 2014-07-04 11:09   ` Joerg Roedel
  0 siblings, 0 replies; 6+ messages in thread
From: Joerg Roedel @ 2014-07-04 11:09 UTC (permalink / raw)
  To: Fabian Frederick; +Cc: linux-kernel, Grant Likely, iommu, devicetree

On Sun, Jun 29, 2014 at 10:01:26AM +0200, Fabian Frederick wrote:
> Fix checkpatch warning:
> WARNING: kfree(NULL) is safe this check is probably not required

Applied, thanks.


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

* Re: [PATCH 1/1] iommu/fsl_pamu: Remove unnecessary null test before kfree
@ 2014-07-04 11:09   ` Joerg Roedel
  0 siblings, 0 replies; 6+ messages in thread
From: Joerg Roedel @ 2014-07-04 11:09 UTC (permalink / raw)
  To: Fabian Frederick
  Cc: Grant Likely, devicetree-u79uwXL29TY76Z2rM5mHXA,
	iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

On Sun, Jun 29, 2014 at 10:01:26AM +0200, Fabian Frederick wrote:
> Fix checkpatch warning:
> WARNING: kfree(NULL) is safe this check is probably not required

Applied, thanks.

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

end of thread, other threads:[~2014-07-04 11:09 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-29  8:01 [PATCH 1/1] iommu/fsl_pamu: Remove unnecessary null test before kfree Fabian Frederick
2014-06-29  8:01 ` Fabian Frederick
2014-06-29 11:17 ` Varun Sethi
2014-06-29 11:17   ` Varun Sethi
2014-07-04 11:09 ` Joerg Roedel
2014-07-04 11:09   ` Joerg Roedel

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.