Skip to contentSkip to conversation

drivers/crypto/ccp: return NULL instead of 0

PATCH In review Pushkar Jambhlekar 2 participants 2 messages May 3, 2017 – Jun 19, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drivers/crypto/ccp: return NULL instead of 0

This change is to handle sparse warning. Return type of function is a pointer to the structure and it returns 0. Instead it should return NULL.

---
 drivers/crypto/ccp/ccp-platform.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/crypto/ccp/ccp-platform.c +2 -2
index 351f28d8..e26969e 100644
@@ -44,7 +44,7 @@ static struct ccp_vdata *ccp_get_of_version(struct platform_device *pdev)
 	if (match && match->data)
 		return (struct ccp_vdata *)match->data;
 #endif
-	return 0;
+	return NULL;
 }
 
 static struct ccp_vdata *ccp_get_acpi_version(struct platform_device *pdev)
@@ -56,7 +56,7 @@ static struct ccp_vdata *ccp_get_acpi_version(struct platform_device *pdev)
 	if (match && match->driver_data)
 		return (struct ccp_vdata *)match->driver_data;
 #endif
-	return 0;
+	return NULL;
 }
 
 static int ccp_get_irq(struct ccp_device *ccp)
Signature · 1 line
2.7.4
maintainer
#1 lore raw
Quoted 4 lines · Pushkar Jambhlekar

This change is to handle sparse warning. Return type of function is a pointer to the structure and it returns 0. Instead it should return NULL.

Patch applied. Thanks.

Signature · 3 lines
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt