aboutsummaryrefslogtreecommitdiff
path: root/net/unix/sysctl_net_unix.c
diff options
context:
space:
mode:
authorAndrey Smirnov <[email protected]>2016-07-21 14:59:20 -0700
committerBoris Brezillon <[email protected]>2016-09-23 09:35:16 +0200
commit76fe334f71dd20f7eadd4c624441ec7d1fb92f33 (patch)
treeee8352cdd10cf0d030a9c1e8ca8296fc17946867 /net/unix/sysctl_net_unix.c
parent75c19e58abaed01ae20ad5802f6a6aa5a255117d (diff)
mtd: nand: Error out if cmd_ctrl() is missing
If no user specified chip->select_chip() function is provided, code in nand_base.c will automatically set this hook to nand_select_chip(), which in turn depends on chip->cmd_ctrl() hook being valid. Not providing both of those functions in NAND controller driver (for example by mistake) will result in a bit cryptic segfault. Same is true for chip->cmdfunc(). To avoid the above scenario add a check in nand_scan_dent and error out if cmd_ctrl() is not provided. Suggested-by: Boris Brezillon <[email protected]> Suggested-by: Brian Norris <[email protected]> Signed-off-by: Andrey Smirnov <[email protected]> Signed-off-by: Boris Brezillon <[email protected]>
Diffstat (limited to 'net/unix/sysctl_net_unix.c')
0 files changed, 0 insertions, 0 deletions