diff options
-rw-r--r-- | drivers/rtc/rtc-tps6586x.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/rtc/rtc-tps6586x.c b/drivers/rtc/rtc-tps6586x.c index fccf13845022..8415993e98f7 100644 --- a/drivers/rtc/rtc-tps6586x.c +++ b/drivers/rtc/rtc-tps6586x.c @@ -284,6 +284,11 @@ static int __devinit tps6586x_rtc_probe(struct platform_device *pdev) int err; struct tps6586x_epoch_start *epoch; + if (!pdata) { + dev_err(&pdev->dev, "no platform_data specified\n"); + return -EINVAL; + } + rtc = kzalloc(sizeof(*rtc), GFP_KERNEL); if (!rtc) @@ -291,11 +296,6 @@ static int __devinit tps6586x_rtc_probe(struct platform_device *pdev) rtc->irq = -1; - if (!pdata) { - dev_err(&pdev->dev, "no platform_data specified\n"); - return -EINVAL; - } - if (pdata->irq < 0) dev_warn(&pdev->dev, "no IRQ specified, wakeup is disabled\n"); |