| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * LPDDR2-NVM MTD driver. This module provides read, write, erase, lock/unlock |
|---|
| 3 | 4 | * support for LPDDR2-NVM PCM memories |
|---|
| .. | .. |
|---|
| 7 | 8 | * Vincenzo Aliberti <vincenzo.aliberti@gmail.com> |
|---|
| 8 | 9 | * Domenico Manna <domenico.manna@gmail.com> |
|---|
| 9 | 10 | * Many thanks to Andrea Vigilante for initial enabling |
|---|
| 10 | | - * |
|---|
| 11 | | - * This program is free software; you can redistribute it and/or |
|---|
| 12 | | - * modify it under the terms of the GNU General Public License |
|---|
| 13 | | - * as published by the Free Software Foundation; either version 2 |
|---|
| 14 | | - * of the License, or (at your option) any later version. |
|---|
| 15 | | - * |
|---|
| 16 | | - * This program is distributed in the hope that it will be useful, |
|---|
| 17 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 18 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 19 | | - * GNU General Public License for more details. |
|---|
| 20 | 11 | */ |
|---|
| 21 | 12 | |
|---|
| 22 | 13 | #define pr_fmt(fmt) KBUILD_MODNAME ": %s: " fmt, __func__ |
|---|
| .. | .. |
|---|
| 442 | 433 | |
|---|
| 443 | 434 | /* lpddr2_nvm address range */ |
|---|
| 444 | 435 | add_range = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
|---|
| 436 | + if (!add_range) |
|---|
| 437 | + return -ENODEV; |
|---|
| 445 | 438 | |
|---|
| 446 | 439 | /* Populate map_info data structure */ |
|---|
| 447 | 440 | *map = (struct map_info) { |
|---|