mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-02-18 22:36:41 +07:00
mtd: ts5500_flash: avoid calling map_destroy on NULL
map_destroy dereferences its argument. The call is furthermore only reachable when this argument is NULL. Thus the call is dropped. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression *x; @@ *if (x == NULL) { ... * map_destroy(x); ... return ...; } // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
This commit is contained in:
parent
f17f12ce9d
commit
3ee7451a02
@ -94,7 +94,6 @@ static int __init init_ts5500_map(void)
|
||||
return 0;
|
||||
|
||||
err1:
|
||||
map_destroy(mymtd);
|
||||
iounmap(ts5500_map.virt);
|
||||
err2:
|
||||
return rc;
|
||||
|
Loading…
Reference in New Issue
Block a user