irq-mbigen.c (5ba9b0a14132d0b8d97affe909f324045a968d03) | irq-mbigen.c (ad7cc3c0c57d77b442db323056354d0e49833569) |
---|---|
1/* 2 * Copyright (C) 2015 Hisilicon Limited, All Rights Reserved. 3 * Author: Jun Ma <majun258@huawei.com> 4 * Author: Yun Wu <wuyun.wu@huawei.com> 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License version 2 as 8 * published by the Free Software Foundation. --- 323 unchanged lines hidden (view full) --- 332 333 mgn_chip = devm_kzalloc(&pdev->dev, sizeof(*mgn_chip), GFP_KERNEL); 334 if (!mgn_chip) 335 return -ENOMEM; 336 337 mgn_chip->pdev = pdev; 338 339 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 1/* 2 * Copyright (C) 2015 Hisilicon Limited, All Rights Reserved. 3 * Author: Jun Ma <majun258@huawei.com> 4 * Author: Yun Wu <wuyun.wu@huawei.com> 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License version 2 as 8 * published by the Free Software Foundation. --- 323 unchanged lines hidden (view full) --- 332 333 mgn_chip = devm_kzalloc(&pdev->dev, sizeof(*mgn_chip), GFP_KERNEL); 334 if (!mgn_chip) 335 return -ENOMEM; 336 337 mgn_chip->pdev = pdev; 338 339 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
340 if (!res) 341 return -EINVAL; 342 |
|
340 mgn_chip->base = devm_ioremap(&pdev->dev, res->start, 341 resource_size(res)); 342 if (!mgn_chip->base) { 343 dev_err(&pdev->dev, "failed to ioremap %pR\n", res); 344 return -ENOMEM; 345 } 346 347 if (IS_ENABLED(CONFIG_OF) && pdev->dev.of_node) --- 43 unchanged lines hidden --- | 343 mgn_chip->base = devm_ioremap(&pdev->dev, res->start, 344 resource_size(res)); 345 if (!mgn_chip->base) { 346 dev_err(&pdev->dev, "failed to ioremap %pR\n", res); 347 return -ENOMEM; 348 } 349 350 if (IS_ENABLED(CONFIG_OF) && pdev->dev.of_node) --- 43 unchanged lines hidden --- |