On Fri, 22 May 2020 12:59:29 +0800, Dinghao Liu wrote:
> When ufs_bsg_alloc_desc_buffer() returns an error code,
> a pairing runtime PM usage counter decrement is needed
> to keep the counter balanced.
Applied to 5.8/scsi-fixes, thanks!
[1/1] scsi: ufs-bsg: Fix runtime PM imbalance on error
Hi,
> Avri: Please review!
>
> > When ufs_bsg_alloc_desc_buffer() returns an error code,
> > a pairing runtime PM usage counter decrement is needed
> > to keep the counter balanced.
> >
> > Signed-off-by: Dinghao Liu
Please add:
Fixes: 74e5e468b664 (scsi: ufs-bsg: Wake the device before
Avri: Please review!
> When ufs_bsg_alloc_desc_buffer() returns an error code,
> a pairing runtime PM usage counter decrement is needed
> to keep the counter balanced.
>
> Signed-off-by: Dinghao Liu
> ---
> drivers/scsi/ufs/ufs_bsg.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
> Hi, Dinghao
>
> > Thank you for your advice! Moving original pm_runtime_put_sync() to after
> > "out" label will influence an error path branched from
> > ups_bsg_verify_query_size(). So I think changing "goto out" to "break" is a
> > good
> > idea. But in this case we may execute an extra
> >
Hi, Dinghao
> Thank you for your advice! Moving original pm_runtime_put_sync() to after
> "out" label will influence an error path branched from
> ups_bsg_verify_query_size(). So I think changing "goto out" to "break" is a
> good
> idea. But in this case we may execute an extra
>
Hi, Bean
Thank you for your advice! Moving original pm_runtime_put_sync()
to after "out" label will influence an error path branched from
ups_bsg_verify_query_size(). So I think changing "goto out" to
"break" is a good idea. But in this case we may execute an extra
sg_copy_from_buffer() and an
> 1 file changed, 3 insertions(+), 1 deletion(-)
Hi, Dinghao
>
> diff --git a/drivers/scsi/ufs/ufs_bsg.c b/drivers/scsi/ufs/ufs_bsg.c index
> 53dd87628cbe..516a7f573942 100644
> --- a/drivers/scsi/ufs/ufs_bsg.c
> +++ b/drivers/scsi/ufs/ufs_bsg.c
> @@ -106,8 +106,10 @@ static int
When ufs_bsg_alloc_desc_buffer() returns an error code,
a pairing runtime PM usage counter decrement is needed
to keep the counter balanced.
Signed-off-by: Dinghao Liu
---
drivers/scsi/ufs/ufs_bsg.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git
8 matches
Mail list logo