]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
usb: typec: ucsi: Remove incorrect warning
authorHeikki Krogerus <heikki.krogerus@linux.intel.com>
Thu, 22 Sep 2022 14:59:24 +0000 (17:59 +0300)
committerStefan Bader <stefan.bader@canonical.com>
Wed, 23 Nov 2022 14:11:55 +0000 (15:11 +0100)
BugLink: https://bugs.launchpad.net/bugs/1995517
commit 415ba26cb73f7d22a892043301b91b57ae54db02 upstream.

Sink only devices do not have any source capabilities, so
the driver should not warn about that. Also DRP (Dual Role
Power) capable devices, such as USB Type-C docking stations,
do not return any source capabilities unless they are
plugged to a power supply themselves.

Fixes: 1f4642b72be7 ("usb: typec: ucsi: Retrieve all the PDOs instead of just the first 4")
Reported-by: Paul Menzel <pmenzel@molgen.mpg.de>
Cc: <stable@vger.kernel.org>
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20220922145924.80667-1-heikki.krogerus@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/usb/typec/ucsi/ucsi.c

index 2fdf481af4649ff50df98a23add37b0c7f51fb32..3f70e1aa1328a826625bbeae9673b8e78716227b 100644 (file)
@@ -577,8 +577,6 @@ static int ucsi_get_pdos(struct ucsi_connector *con, int is_partner,
                                num_pdos * sizeof(u32));
        if (ret < 0 && ret != -ETIMEDOUT)
                dev_err(ucsi->dev, "UCSI_GET_PDOS failed (%d)\n", ret);
-       if (ret == 0 && offset == 0)
-               dev_warn(ucsi->dev, "UCSI_GET_PDOS returned 0 bytes\n");
 
        return ret;
 }