summaryrefslogtreecommitdiff
path: root/drivers/usb/gadget/function
diff options
context:
space:
mode:
authorKrzysztof Opasiak <k.opasiak@samsung.com>2016-12-20 21:52:16 +0300
committerFelipe Balbi <felipe.balbi@linux.intel.com>2017-01-02 11:55:28 +0300
commit7e4da3fcf7c9fe042f2f7cb7bf23861a899b4a8f (patch)
treed29bc543131edce31c5ac39040feee02000eea3d /drivers/usb/gadget/function
parent51c1685d956221576e165dd88a20063b169bae5a (diff)
downloadlinux-7e4da3fcf7c9fe042f2f7cb7bf23861a899b4a8f.tar.xz
usb: gadget: composite: Test get_alt() presence instead of set_alt()
By convention (according to doc) if function does not provide get_alt() callback composite framework should assume that it has only altsetting 0 and should respond with error if host tries to set other one. After commit dd4dff8b035f ("USB: composite: Fix bug: should test set_alt function pointer before use it") we started checking set_alt() callback instead of get_alt(). This check is useless as we check if set_alt() is set inside usb_add_function() and fail if it's NULL. Let's fix this check and move comment about why we check the get method instead of set a little bit closer to prevent future false fixes. Fixes: dd4dff8b035f ("USB: composite: Fix bug: should test set_alt function pointer before use it") Cc: stable <stable@vger.kernel.org> Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'drivers/usb/gadget/function')
0 files changed, 0 insertions, 0 deletions