hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/drivers/char/hw_random/timeriomem-rng.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * drivers/char/hw_random/timeriomem-rng.c
34 *
....@@ -6,10 +7,6 @@
67 * Derived from drivers/char/hw_random/omap-rng.c
78 * Copyright 2005 (c) MontaVista Software, Inc.
89 * 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.
1310 *
1411 * Overview:
1512 * This driver is useful for platforms that have an IO range that provides
....@@ -120,9 +117,9 @@
120117 if (!res)
121118 return -ENXIO;
122119
123
- if (res->start % 4 != 0 || resource_size(res) != 4) {
120
+ if (res->start % 4 != 0 || resource_size(res) < 4) {
124121 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");
126123 return -EINVAL;
127124 }
128125