.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * drivers/char/hw_random/timeriomem-rng.c |
---|
3 | 4 | * |
---|
.. | .. |
---|
6 | 7 | * Derived from drivers/char/hw_random/omap-rng.c |
---|
7 | 8 | * Copyright 2005 (c) MontaVista Software, Inc. |
---|
8 | 9 | * Author: Deepak Saxena <dsaxena@plexity.net> |
---|
9 | | - * |
---|
10 | | - * This program is free software; you can redistribute it and/or modify |
---|
11 | | - * it under the terms of the GNU General Public License version 2 as |
---|
12 | | - * published by the Free Software Foundation. |
---|
13 | 10 | * |
---|
14 | 11 | * Overview: |
---|
15 | 12 | * This driver is useful for platforms that have an IO range that provides |
---|
.. | .. |
---|
120 | 117 | if (!res) |
---|
121 | 118 | return -ENXIO; |
---|
122 | 119 | |
---|
123 | | - if (res->start % 4 != 0 || resource_size(res) != 4) { |
---|
| 120 | + if (res->start % 4 != 0 || resource_size(res) < 4) { |
---|
124 | 121 | dev_err(&pdev->dev, |
---|
125 | | - "address must be four bytes wide and aligned\n"); |
---|
| 122 | + "address must be at least four bytes wide and 32-bit aligned\n"); |
---|
126 | 123 | return -EINVAL; |
---|
127 | 124 | } |
---|
128 | 125 | |
---|