Re: [PATCH] staging: gasket: sysfs: fix potential null dereference

2018-08-01 Thread Greg KH
On Tue, Jul 31, 2018 at 06:23:20PM +0300, Ivan Bornyakov wrote: > Add handling of possible allocation failure. > > Reported by smatch: > > drivers/staging/gasket/gasket_sysfs.c:105 put_mapping() error: potential > null dereference 'files_to_remove'. (kcalloc returns null) > > Signed-off-by: I

[PATCH] staging: gasket: sysfs: fix potential null dereference

2018-07-31 Thread Ivan Bornyakov
Add handling of possible allocation failure. Reported by smatch: drivers/staging/gasket/gasket_sysfs.c:105 put_mapping() error: potential null dereference 'files_to_remove'. (kcalloc returns null) Signed-off-by: Ivan Bornyakov --- drivers/staging/gasket/gasket_sysfs.c | 6 ++ 1 file cha