[PATCH] staging: tidspbridge: fix error return code in omap34_xx_bridge_probe()

Wei Yongjun weiyj.lk at gmail.com
Fri Jun 7 02:14:27 UTC 2013


From: Wei Yongjun <yongjun_wei at trendmicro.com.cn>

Fix to return a negative error code in the class_create() error
handling case instead of 0, as done elsewhere in this function.

Signed-off-by: Wei Yongjun <yongjun_wei at trendmicro.com.cn>
---
 drivers/staging/tidspbridge/rmgr/drv_interface.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/staging/tidspbridge/rmgr/drv_interface.c b/drivers/staging/tidspbridge/rmgr/drv_interface.c
index c4d632c..6d04eb4 100644
--- a/drivers/staging/tidspbridge/rmgr/drv_interface.c
+++ b/drivers/staging/tidspbridge/rmgr/drv_interface.c
@@ -507,6 +507,7 @@ static int omap34_xx_bridge_probe(struct platform_device *pdev)
 	bridge_class = class_create(THIS_MODULE, "ti_bridge");
 	if (IS_ERR(bridge_class)) {
 		pr_err("%s: Error creating bridge class\n", __func__);
+		err = PTR_ERR(bridge_class);
 		goto err3;
 	}
 




More information about the devel mailing list