mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-15 08:14:15 +08:00
usb: musb: gadget: fix to_musb_ep() to not return NULL
UDC core ensures the usb_ep parameter passed in is not NULL, so checking if (ep != NULL) is pointless. Convert to_musb_ep() to a simple macro to not directly return NULL to avoid warnings from code static analysis tools. Signed-off-by: Bin Liu <b-liu@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
8dca510718
commit
ddf12f04dc
@ -96,10 +96,7 @@ struct musb_ep {
|
|||||||
u8 hb_mult;
|
u8 hb_mult;
|
||||||
};
|
};
|
||||||
|
|
||||||
static inline struct musb_ep *to_musb_ep(struct usb_ep *ep)
|
#define to_musb_ep(ep) container_of((ep), struct musb_ep, end_point)
|
||||||
{
|
|
||||||
return ep ? container_of(ep, struct musb_ep, end_point) : NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline struct musb_request *next_request(struct musb_ep *ep)
|
static inline struct musb_request *next_request(struct musb_ep *ep)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user