Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1634729 > unrolled thread
| Started by | Pushkar Jambhlekar <pushkar.iit@gmail.com> |
|---|---|
| First post | 2017-05-03 06:10 +0200 |
| Last post | 2017-05-03 06:10 +0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
[PATCH] drivers/crypto/ccp: return NULL instead of 0 Pushkar Jambhlekar <pushkar.iit@gmail.com> - 2017-05-03 06:10 +0200
| From | Pushkar Jambhlekar <pushkar.iit@gmail.com> |
|---|---|
| Date | 2017-05-03 06:10 +0200 |
| Subject | [PATCH] drivers/crypto/ccp: return NULL instead of 0 |
| Message-ID | <tCTLX-80o-3@gated-at.bofh.it> |
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. Signed-off-by: Pushkar Jambhlekar <pushkar.iit@gmail.com> --- drivers/crypto/ccp/ccp-platform.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/crypto/ccp/ccp-platform.c b/drivers/crypto/ccp/ccp-platform.c index 351f28d8..e26969e 100644 --- a/drivers/crypto/ccp/ccp-platform.c +++ b/drivers/crypto/ccp/ccp-platform.c @@ -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) -- 2.7.4
Back to top | Article view | linux.kernel
csiph-web