diff mbox series

[1/2] tee: optee: don't fail probe because of optee-rng

Message ID 20221207153000.534581-1-etienne.carriere@linaro.org
State Accepted
Commit 476a3d58dfeb6230f44b629e5791d70f0e55d78f
Headers show
Series [1/2] tee: optee: don't fail probe because of optee-rng | expand

Commit Message

Etienne Carriere Dec. 7, 2022, 3:29 p.m. UTC
Fixes optee-rng driver bind sequence in optee driver to print a warning
message but not report an error status when a optee-rng service driver
fails to be bound as the optee driver itself is still fully functional.

Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
---
 drivers/tee/optee/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Ilias Apalodimas Dec. 22, 2022, 9:30 a.m. UTC | #1
On Wed, Dec 07, 2022 at 04:29:59PM +0100, Etienne Carriere wrote:
> Fixes optee-rng driver bind sequence in optee driver to print a warning
> message but not report an error status when a optee-rng service driver
> fails to be bound as the optee driver itself is still fully functional.
>
> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
> ---
>  drivers/tee/optee/core.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/tee/optee/core.c b/drivers/tee/optee/core.c
> index 9240277579..604fd1414f 100644
> --- a/drivers/tee/optee/core.c
> +++ b/drivers/tee/optee/core.c
> @@ -834,7 +834,7 @@ static int optee_probe(struct udevice *dev)
>  		 */
>  		ret = device_bind_driver(dev, "optee-rng", "optee-rng", NULL);
>  		if (ret)
> -			return ret;
> +			dev_warn(dev, "ftpm_tee failed to bind: %d\n", ret);
>  	}
>
>  	return 0;
> --
> 2.25.1
>

Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Jens Wiklander Dec. 22, 2022, 10:57 a.m. UTC | #2
On Wed, Dec 7, 2022 at 4:30 PM Etienne Carriere
<etienne.carriere@linaro.org> wrote:
>
> Fixes optee-rng driver bind sequence in optee driver to print a warning
> message but not report an error status when a optee-rng service driver
> fails to be bound as the optee driver itself is still fully functional.
>
> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
> ---
>  drivers/tee/optee/core.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>

Thanks,
Jens

>
> diff --git a/drivers/tee/optee/core.c b/drivers/tee/optee/core.c
> index 9240277579..604fd1414f 100644
> --- a/drivers/tee/optee/core.c
> +++ b/drivers/tee/optee/core.c
> @@ -834,7 +834,7 @@ static int optee_probe(struct udevice *dev)
>                  */
>                 ret = device_bind_driver(dev, "optee-rng", "optee-rng", NULL);
>                 if (ret)
> -                       return ret;
> +                       dev_warn(dev, "ftpm_tee failed to bind: %d\n", ret);
>         }
>
>         return 0;
> --
> 2.25.1
>
Patrick DELAUNAY Jan. 3, 2023, 4:53 p.m. UTC | #3
Hi,

On 12/7/22 16:29, Etienne Carriere wrote:
> Fixes optee-rng driver bind sequence in optee driver to print a warning
> message but not report an error status when a optee-rng service driver
> fails to be bound as the optee driver itself is still fully functional.
>
> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
> ---
>   drivers/tee/optee/core.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/tee/optee/core.c b/drivers/tee/optee/core.c
> index 9240277579..604fd1414f 100644
> --- a/drivers/tee/optee/core.c
> +++ b/drivers/tee/optee/core.c
> @@ -834,7 +834,7 @@ static int optee_probe(struct udevice *dev)
>   		 */
>   		ret = device_bind_driver(dev, "optee-rng", "optee-rng", NULL);
>   		if (ret)
> -			return ret;
> +			dev_warn(dev, "ftpm_tee failed to bind: %d\n", ret);
>   	}
>   
>   	return 0;



Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>

Thanks
Patrick
diff mbox series

Patch

diff --git a/drivers/tee/optee/core.c b/drivers/tee/optee/core.c
index 9240277579..604fd1414f 100644
--- a/drivers/tee/optee/core.c
+++ b/drivers/tee/optee/core.c
@@ -834,7 +834,7 @@  static int optee_probe(struct udevice *dev)
 		 */
 		ret = device_bind_driver(dev, "optee-rng", "optee-rng", NULL);
 		if (ret)
-			return ret;
+			dev_warn(dev, "ftpm_tee failed to bind: %d\n", ret);
 	}
 
 	return 0;