media: qcom: camss: Propagate vfe_reset error up the callstack
authorBryan O'Donoghue <bryan.odonoghue@linaro.org>
Mon, 25 Sep 2023 15:47:06 +0000 (16:47 +0100)
committerHans Verkuil <hverkuil-cisco@xs4all.nl>
Sat, 7 Oct 2023 08:55:44 +0000 (10:55 +0200)
A previous patch I had removed the returns from vfe_disable() since we
didn't trap any meaningful errors. Konrad pointed out vfe_reset() could
return an error, which is true.

Trap the vfe_reset() error code and throw it up the callstack.

Suggested-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
drivers/media/platform/qcom/camss/camss-vfe.c

index b3d5af7f09690f5116ae8d2310e1aed0a657b303..4839e2cedfe584842202bf6fd46dd9de3abb9dc0 100644 (file)
@@ -435,8 +435,11 @@ static int vfe_disable_output(struct vfe_line *line)
 int vfe_disable(struct vfe_line *line)
 {
        struct vfe_device *vfe = to_vfe(line);
+       int ret;
 
-       vfe_disable_output(line);
+       ret = vfe_disable_output(line);
+       if (ret)
+               goto error;
 
        vfe_put_output(line);
 
@@ -446,7 +449,8 @@ int vfe_disable(struct vfe_line *line)
 
        mutex_unlock(&vfe->stream_lock);
 
-       return 0;
+error:
+       return ret;
 }
 
 /**