blob: 9aa43e0d192f1761b26d69b866f3fc42d2953afe (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
static int __devinit vain_plat_probe(struct platform_device *pdev)
{
struct vain_plat_info *info;
struct resource *res, *mem;
int err;
info = kzalloc(sizeof(struct vain_plat_info), GFP_KERNEL);
if (unlikely(!info)) {
dev_err(&pdev->dev, "Could not allocate memory\n");
err = -ENOMEM;
goto out;
}
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (unlikely(!res)) {
dev_err(&pdev->dev, "I/O address already in use\n");
err = -ENOENT;
goto err_free;
}
|