OSDN Git Service

usb: gadget: tegra-xudc: Fix error check in tegra_xudc_powerdomain_init()
authorTang Bin <tangbin@cmss.chinamobile.com>
Wed, 25 May 2022 13:53:32 +0000 (21:53 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 Jun 2022 09:48:49 +0000 (11:48 +0200)
commitf08aa7c80dac27ee00fa6827f447597d2fba5465
treee05f2a36aac73aa3df5427b2b974f88373a29d8b
parent7afe69ad9221a77dc782b81f49cd7f99987740ed
usb: gadget: tegra-xudc: Fix error check in tegra_xudc_powerdomain_init()

dev_pm_domain_attach_by_name() may return NULL in some cases,
so IS_ERR() doesn't meet the requirements. Thus fix it.

Fixes: 49db427232fe ("usb: gadget: Add UDC driver for tegra XUSB device mode controller")
Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com>
Link: https://lore.kernel.org/r/20220525135332.23144-1-tangbin@cmss.chinamobile.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/udc/tegra-xudc.c