Re: [PATCH 3/4] usb: typec: Factor out non-PD fwnode properties

From: Guenter Roeck
Date: Wed Feb 02 2022 - 14:53:08 EST


On Wed, Feb 02, 2022 at 02:22:27PM +0800, kernel test robot wrote:
> Hi Samuel,
>
> Thank you for the patch! Perhaps something to improve:
>
> [auto build test WARNING on usb/usb-testing]
> [also build test WARNING on robh/for-next v5.17-rc2 next-20220202]
> [If your patch is applied to the wrong git tree, kindly drop us a note.
> And when submitting patch, we suggest to use '--base' as documented in
> https://git-scm.com/docs/git-format-patch]
>
> url: https://github.com/0day-ci/linux/commits/Samuel-Holland/dt-bindings-vendor-prefixes-Add-willsemi/20220201-112541
> base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing
> config: openrisc-randconfig-m031-20220201 (https://download.01.org/0day-ci/archive/20220202/202202021458.xcH4F4SQ-lkp@xxxxxxxxx/config)
> compiler: or1k-linux-gcc (GCC) 11.2.0
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@xxxxxxxxx>
>
> smatch warnings:
> drivers/usb/typec/class.c:1919 typec_get_fw_cap() warn: unsigned 'cap->type' is never less than zero.
> drivers/usb/typec/class.c:1926 typec_get_fw_cap() warn: unsigned 'cap->data' is never less than zero.
>

Ah yes, there was a reason to assign the return values to 'ret' first
and only afterwards to the actual capabilities. Please fix and resubmit.

Guenter