]> git.baikalelectronics.ru Git - kernel.git/commit
usb: typec: ucsi: acpi: fix a NULL vs IS_ERR() check in probe
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 9 May 2022 09:08:28 +0000 (12:08 +0300)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 30 May 2022 16:03:38 +0000 (18:03 +0200)
commite87bd988d459614565b1599f54314facc3ee909a
tree4f31569d885b13ba13fc667990a077e93f73801f
parent291c1f2167c3c4750037942a78d17e5a5a85ae00
usb: typec: ucsi: acpi: fix a NULL vs IS_ERR() check in probe

The devm_memremap() function never returns NULL.  It returns error
pointers.

Fixes: 9b51265d8f77 ("usb: typec: ucsi: acpi: Map the mailbox with memremap()")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/usb/typec/ucsi/ucsi_acpi.c