Skip to content

Commit 3c7dc6a

Browse files
committed
Merge tag 'usb-ci-v4.5-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb into usb-linus
Peter writes: Some tiny bug fixes for chipidea driver
2 parents 18558ca + 8c0614c commit 3c7dc6a

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

drivers/usb/chipidea/ci_hdrc_pci.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ static int ci_hdrc_pci_probe(struct pci_dev *pdev,
8585

8686
/* register a nop PHY */
8787
ci->phy = usb_phy_generic_register();
88-
if (!ci->phy)
89-
return -ENOMEM;
88+
if (IS_ERR(ci->phy))
89+
return PTR_ERR(ci->phy);
9090

9191
memset(res, 0, sizeof(res));
9292
res[0].start = pci_resource_start(pdev, 0);

drivers/usb/chipidea/debug.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,9 @@ static ssize_t ci_port_test_write(struct file *file, const char __user *ubuf,
100100
if (sscanf(buf, "%u", &mode) != 1)
101101
return -EINVAL;
102102

103+
if (mode > 255)
104+
return -EBADRQC;
105+
103106
pm_runtime_get_sync(ci->dev);
104107
spin_lock_irqsave(&ci->lock, flags);
105108
ret = hw_port_test_set(ci, mode);

0 commit comments

Comments
 (0)