]> Pileus Git - ~andy/linux/blobdiff - drivers/mfd/jz4740-adc.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
[~andy/linux] / drivers / mfd / jz4740-adc.c
index b30e44ac4d1c5bbef20d48df9643ebc620c70eef..3ad492cb6c4158b9160e3a2fefc7fb6423086ba5 100644 (file)
@@ -260,6 +260,10 @@ static int __devinit jz4740_adc_probe(struct platform_device *pdev)
        int irq;
 
        adc = kmalloc(sizeof(*adc), GFP_KERNEL);
+       if (!adc) {
+               dev_err(&pdev->dev, "Failed to allocate driver structure\n");
+               return -ENOMEM;
+       }
 
        adc->irq = platform_get_irq(pdev, 0);
        if (adc->irq < 0) {