Randy Dunlap 786ae133e0 lib: fix test_hmm.c reference after free
Coccinelle scripts report the following errors:

  lib/test_hmm.c:523:20-26: ERROR: reference preceded by free on line 521
  lib/test_hmm.c:524:21-27: ERROR: reference preceded by free on line 521
  lib/test_hmm.c:523:28-35: ERROR: devmem is NULL but dereferenced.
  lib/test_hmm.c:524:29-36: ERROR: devmem is NULL but dereferenced.

Fix these by using the local variable 'res' instead of devmem.

Link: http://lkml.kernel.org/r/c845c158-9c65-9665-0d0b-00342846dd07@infradead.org
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Reviewed-by: Ralph Campbell <rcampbell@nvidia.com>
Cc: Jérôme Glisse <jglisse@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2020-06-26 00:27:37 -07:00
..
2020-06-09 10:03:12 -07:00
2020-06-11 15:54:31 -07:00
2020-05-24 20:48:11 +02:00
2018-08-16 12:14:42 -07:00
2020-06-01 08:23:42 -04:00
2014-04-30 19:49:37 +01:00
2017-02-24 17:46:57 -08:00
2020-06-07 10:53:36 -07:00
2020-05-07 14:54:26 +08:00
2018-10-16 13:45:44 +02:00
2020-06-15 18:22:43 -07:00
2019-07-11 15:17:41 -07:00
2018-06-27 18:58:49 +03:00
2018-10-15 16:31:29 -04:00
2020-06-07 10:53:36 -07:00
2020-06-09 10:03:12 -07:00
2020-06-04 19:06:28 -07:00
2020-06-01 12:13:30 -07:00
2017-08-15 09:02:07 -07:00