Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3e340c05 authored by Jani Nikula's avatar Jani Nikula Committed by Roland Dreier
Browse files

IB/cm: Fix device_create() return value check



Use IS_ERR() instead of comparing to NULL.

Signed-off-by: default avatarJani Nikula <ext-jani.1.nikula@nokia.com>
Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
parent b72c4094
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -3693,7 +3693,7 @@ static void cm_add_one(struct ib_device *ib_device)
	cm_dev->device = device_create(&cm_class, &ib_device->dev,
				       MKDEV(0, 0), NULL,
				       "%s", ib_device->name);
	if (!cm_dev->device) {
	if (IS_ERR(cm_dev->device)) {
		kfree(cm_dev);
		return;
	}