diff mbox series

of/platform: Clean up a return type in of_link_property()

Message ID 20190808103207.GA30506@mwanda
State Superseded, archived
Headers show
Series of/platform: Clean up a return type in of_link_property() | expand

Checks

Context Check Description
robh/checkpatch success

Commit Message

Dan Carpenter Aug. 8, 2019, 10:32 a.m. UTC
This function is supposed to return zero on success and negative
error codes on failure but currently it returns true on failure.  The
caller only checks for zero and non-zero so this mixup doesn't cause any
runtime issues.

Fixes: 690ff7881b26 ("of/platform: Add functional dependency link from DT bindings")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
 drivers/of/platform.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Frank Rowand Aug. 8, 2019, 4:09 p.m. UTC | #1
On 8/8/19 3:32 AM, Dan Carpenter wrote:
> This function is supposed to return zero on success and negative
> error codes on failure but currently it returns true on failure.  The
> caller only checks for zero and non-zero so this mixup doesn't cause any
> runtime issues.
> 
> Fixes: 690ff7881b26 ("of/platform: Add functional dependency link from DT bindings")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---
>  drivers/of/platform.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/of/platform.c b/drivers/of/platform.c
> index 21838226d68a..86fb8ab8c012 100644
> --- a/drivers/of/platform.c
> +++ b/drivers/of/platform.c
> @@ -625,7 +625,7 @@ static const struct supplier_bindings bindings[] = {
>  	{ },
>  };
>  
> -static bool of_link_property(struct device *dev, struct device_node *con_np,
> +static int of_link_property(struct device *dev, struct device_node *con_np,
>  			     const char *prop)
>  {
>  	struct device_node *phandle;
> 

Hi Dan,


Thanks for catching this.

Another patch was submitted to fix this just before your patch.

-Frank
diff mbox series

Patch

diff --git a/drivers/of/platform.c b/drivers/of/platform.c
index 21838226d68a..86fb8ab8c012 100644
--- a/drivers/of/platform.c
+++ b/drivers/of/platform.c
@@ -625,7 +625,7 @@  static const struct supplier_bindings bindings[] = {
 	{ },
 };
 
-static bool of_link_property(struct device *dev, struct device_node *con_np,
+static int of_link_property(struct device *dev, struct device_node *con_np,
 			     const char *prop)
 {
 	struct device_node *phandle;