Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 788d820a authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "hal: fix return value checks while getting HDMI info"

parents 48aa427e 1b3957ee
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -1958,9 +1958,10 @@ static int read_hdmi_sink_caps(struct stream_out *out)
    reset_hdmi_sink_caps(out);

    /* Cache ext disp type */
    if (platform_get_ext_disp_type_v2(adev->platform,
    ret = platform_get_ext_disp_type_v2(adev->platform,
                                      out->extconn.cs.controller,
                                      out->extconn.cs.stream <= 0)) {
                                      out->extconn.cs.stream);
    if(ret < 0) {
        ALOGE("%s: Failed to query disp type, ret:%d", __func__, ret);
        return -EINVAL;
    }
@@ -4886,7 +4887,7 @@ static int out_set_parameters(struct audio_stream *stream, const char *kvpairs)

    err = platform_get_controller_stream_from_params(parms, &ext_controller,
                                                       &ext_stream);
    if (err >= 0) {
    if (err == 0) {
        out->extconn.cs.controller = ext_controller;
        out->extconn.cs.stream = ext_stream;
        ALOGD("%s: usecase(%s) new controller/stream (%d/%d)", __func__,
+1 −1
Original line number Diff line number Diff line
@@ -5999,7 +5999,7 @@ int platform_get_ext_disp_type_v2(void *platform, int controller, int stream)
        }

        disp_type = mixer_ctl_get_value(ctl, 0);
        if (disp_type == EXT_DISPLAY_TYPE_NONE) {
        if (disp_type <= EXT_DISPLAY_TYPE_NONE) {
             ALOGE("%s: Invalid external display type: %d", __func__, disp_type);
             return -EINVAL;
        }