crypto: ccp - return NULL instead of 0
authorpjambhlekar <pushkar.iit@gmail.com>
Wed, 3 May 2017 04:02:09 +0000 (09:32 +0530)
committerHerbert Xu <herbert@gondor.apana.org.au>
Mon, 19 Jun 2017 06:11:47 +0000 (14:11 +0800)
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>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/ccp/ccp-platform.c

index 351f28d8c3362febac6b09b8428c1a9204023dc9..e26969e601ad68c2d96db432f533b61b48b4c0fe 100644 (file)
@@ -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)