Message ID | 3ce85d6b-6b25-2988-960b-84fa0b7a8c61@users.sourceforge.net (mailing list archive) |
---|---|
State | Rejected, archived |
Headers | show |
diff --git a/drivers/platform/x86/dell-smo8800.c b/drivers/platform/x86/dell-smo8800.c index 1d87237bc731..9590d5e7c5ca 100644 --- a/drivers/platform/x86/dell-smo8800.c +++ b/drivers/platform/x86/dell-smo8800.c @@ -150,10 +150,8 @@ static int smo8800_add(struct acpi_device *device) struct smo8800_device *smo8800; smo8800 = devm_kzalloc(&device->dev, sizeof(*smo8800), GFP_KERNEL); - if (!smo8800) { - dev_err(&device->dev, "failed to allocate device data\n"); + if (!smo8800) return -ENOMEM; - } smo8800->dev = &device->dev; smo8800->miscdev.minor = MISC_DYNAMIC_MINOR;