Re: [PATCH v16 06/11] fw_cfg: handle fw_cfg_read_blob() error

2018-03-01 Thread Marc-André Lureau
Hi On Wed, Feb 28, 2018 at 6:32 PM, Michael S. Tsirkin wrote: >> @@ -557,7 +566,10 @@ static int fw_cfg_sysfs_probe(struct platform_device >> *pdev) >> goto err_probe; >> >> /* get revision number, add matching top-level attribute */ >> -

Re: [PATCH v16 06/11] fw_cfg: handle fw_cfg_read_blob() error

2018-03-01 Thread Marc-André Lureau
Hi On Wed, Feb 28, 2018 at 6:32 PM, Michael S. Tsirkin wrote: >> @@ -557,7 +566,10 @@ static int fw_cfg_sysfs_probe(struct platform_device >> *pdev) >> goto err_probe; >> >> /* get revision number, add matching top-level attribute */ >> - fw_cfg_read_blob(FW_CFG_ID, , 0,

Re: [PATCH v16 06/11] fw_cfg: handle fw_cfg_read_blob() error

2018-02-28 Thread Michael S. Tsirkin
> @@ -557,7 +566,10 @@ static int fw_cfg_sysfs_probe(struct platform_device > *pdev) > goto err_probe; > > /* get revision number, add matching top-level attribute */ > - fw_cfg_read_blob(FW_CFG_ID, , 0, sizeof(rev)); > + err = fw_cfg_read_blob(FW_CFG_ID, , 0,

Re: [PATCH v16 06/11] fw_cfg: handle fw_cfg_read_blob() error

2018-02-28 Thread Michael S. Tsirkin
> @@ -557,7 +566,10 @@ static int fw_cfg_sysfs_probe(struct platform_device > *pdev) > goto err_probe; > > /* get revision number, add matching top-level attribute */ > - fw_cfg_read_blob(FW_CFG_ID, , 0, sizeof(rev)); > + err = fw_cfg_read_blob(FW_CFG_ID, , 0,

[PATCH v16 06/11] fw_cfg: handle fw_cfg_read_blob() error

2018-02-28 Thread Marc-André Lureau
fw_cfg_read_blob() may fail, but does not return error. This may lead to surprising behaviours, like populating zero file entries (in register_file() or during read). Return an error if ACPI locking failed. Also, the following DMA read/write extension will add more error paths that should be

[PATCH v16 06/11] fw_cfg: handle fw_cfg_read_blob() error

2018-02-28 Thread Marc-André Lureau
fw_cfg_read_blob() may fail, but does not return error. This may lead to surprising behaviours, like populating zero file entries (in register_file() or during read). Return an error if ACPI locking failed. Also, the following DMA read/write extension will add more error paths that should be