Merge branch 'linux-linaro-lsk-v4.4' into linux-linaro-lsk-v4.4-android
[firefly-linux-kernel-4.4.55.git] / drivers / leds / leds-bd2802.c
index fb5a3472d61444c1cd8d491ee8a5ee571f39765c..6078c15d3452df77da066ec2f3d00bc805c02fa0 100644 (file)
@@ -678,10 +678,8 @@ static int bd2802_probe(struct i2c_client *client,
        int ret, i;
 
        led = devm_kzalloc(&client->dev, sizeof(struct bd2802_led), GFP_KERNEL);
-       if (!led) {
-               dev_err(&client->dev, "failed to allocate driver data\n");
+       if (!led)
                return -ENOMEM;
-       }
 
        led->client = client;
        pdata = led->pdata = dev_get_platdata(&client->dev);