usb: misc: usb3503: delete unnecessary 'out of memory' messages
authorPeter Chen <peter.chen@freescale.com>
Tue, 14 Oct 2014 07:56:05 +0000 (15:56 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 3 Nov 2014 23:42:05 +0000 (15:42 -0800)
The memory subsystem has already had similar message for it.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/misc/usb3503.c

index ae7e1206ca541aa90dcca8b9c15b601fa4fc1d78..b9af8cb192155bf91d1abc402066cdb46ac6f049 100644 (file)
@@ -314,10 +314,8 @@ static int usb3503_i2c_probe(struct i2c_client *i2c,
        int err;
 
        hub = devm_kzalloc(&i2c->dev, sizeof(struct usb3503), GFP_KERNEL);
-       if (!hub) {
-               dev_err(&i2c->dev, "private data alloc fail\n");
+       if (!hub)
                return -ENOMEM;
-       }
 
        i2c_set_clientdata(i2c, hub);
        hub->regmap = devm_regmap_init_i2c(i2c, &usb3503_regmap_config);
@@ -336,10 +334,8 @@ static int usb3503_platform_probe(struct platform_device *pdev)
        struct usb3503 *hub;
 
        hub = devm_kzalloc(&pdev->dev, sizeof(struct usb3503), GFP_KERNEL);
-       if (!hub) {
-               dev_err(&pdev->dev, "private data alloc fail\n");
+       if (!hub)
                return -ENOMEM;
-       }
        hub->dev = &pdev->dev;
 
        return usb3503_probe(hub);