File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -1014,6 +1014,9 @@ struct rp1_pio_client *rp1_pio_open(void)
10141014{
10151015 struct rp1_pio_client * client ;
10161016
1017+ if (!g_pio )
1018+ return ERR_PTR (- ENOENT );
1019+
10171020 client = kzalloc (sizeof (* client ), GFP_KERNEL );
10181021 if (!client )
10191022 return ERR_PTR (- ENOMEM );
@@ -1265,9 +1268,8 @@ static int rp1_pio_probe(struct platform_device *pdev)
12651268 return dev_err_probe (dev , pdev -> id , "alias is missing\n" );
12661269
12671270 fw = devm_rp1_firmware_get (dev , dev -> of_node );
1268- if (IS_ERR (fw ))
1269- return PTR_ERR (fw );
1270-
1271+ if (IS_ERR_OR_NULL (fw ))
1272+ return dev_err_probe (dev , - ENOENT , "failed to contact RP1 firmware\n" );
12711273 ret = rp1_firmware_get_feature (fw , FOURCC_PIO , & op_base , & op_count );
12721274 if (ret < 0 )
12731275 return ret ;
You can’t perform that action at this time.
0 commit comments