Skip to content

Commit

Permalink
crypto: ccp - return NULL instead of 0
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
  • Loading branch information
PushkarJambhlekar authored and herbertx committed Jun 19, 2017
1 parent 3cdbe34 commit 9d1fb19
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/crypto/ccp/ccp-platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit 9d1fb19

Please sign in to comment.